Skip to content
This repository was archived by the owner on Dec 15, 2018. It is now read-only.

Commit 3aca552

Browse files
committed
Allow CsrfProtected on classes
1 parent ac4ad9c commit 3aca552

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

core/src/main/java/org/mvcspec/ozark/security/CsrfValidateInterceptor.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,8 @@ private boolean needsValidation(Method controller) {
179179
case IMPLICIT:
180180
return true;
181181
case EXPLICIT:
182-
return hasAnnotation(controller, CsrfProtected.class);
182+
return hasAnnotation(controller, CsrfProtected.class)
183+
|| hasAnnotation(controller.getDeclaringClass(), CsrfProtected.class);
183184
}
184185
return false;
185186
}

0 commit comments

Comments
 (0)