chkal / mvc-spec-migration-test

0 stars 0 forks source link

CSRF validation should throw CsrfValidationException #70

Open chkal opened 7 years ago

chkal commented 7 years ago

Original issue MVC_SPEC-70 created by Christian Kaltepoth:

Ozark currently throws a CsrfValidationException if a controller method requires a valid CSRF token but the CSRF token validation failed. There is a default exception mapper that handles this exception. The goal of introducing this exception was that users can create a custom ExceptionMapper for it to customize the error handling.

We discussed this on the list and decided that this should be moved to the spec.

https://java.net/projects/mvc-spec/lists/jsr371-experts/archive/2016-03/message/15

Unfortunately JAX-RS doesn't handle multiple exceptions mappers for the same type very well:

https://java.net/projects/jax-rs-spec/lists/users/archive/2016-07/message/3

Therefore we should postpone this feature and wait for JAX-RS to resolve this.

chkal commented 7 years ago

Comment by Christian Kaltepoth:

We will have to wait until this is resolved:

https://java.net/jira/browse/JAX*RS*SPEC-532