You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 15, 2018. It is now read-only.
I'm trying to get CSRF protection to work on my controller. It looks like this:
@CsrfProtected
@POST
@Path("/configure")
@View("redirect:/hello")
public void configure(@FormParam("locale") final String locale) {
// left out
}
If I read the spec correctly, the default for javax.mvc.security.CsrfProtection is EXPLICIT, saying that any method annotated with @CsrfProtected is to be protected.
I have a page that submits an HTML form to this controller method using POST, and it lacks the CSRF token parameter. I would expect the form submission to be rejected, but my controller method is hit.
Browsing through Ozark source code, I expect it is the responsibility of the CsrfValidateInterceptor class to perform this check. Using the debugger, I can see it is being instantiated, but the breakpoint in aroundReadFrom(...) is never hit.