Don't handle embedded security exceptions.

This commit is contained in:
Jeff Thompson committed 2020-02-11 14:10:12 -07:00
1 parent 83148e0d83
commit 8baddd2f42
2 files changed
+2 -19

No files matched your search

@@ -126,9 +126,8 @@ public class ExceptionTranslationFilter implements Filter, InitializingBean {
catch (AuthenticationException | AccessDeniedException ex) {
handleException(request, response, chain, ex);
} catch (ServletException ex) {
AcegiSecurityException securityException = containsAccessException(ex);
if (securityException != null) {
handleException(request, response, chain, (AcegiSecurityException) securityException);
if (ex.getRootCause() instanceof AuthenticationException || ex.getRootCause() instanceof AccessDeniedException) {
handleException(request, response, chain, (AcegiSecurityException) ex.getRootCause());
}
else {
throw ex;