1
0
mirror of synced 2026-08-05 09:47:05 +00:00

Make SecurityEnforcementFilter more subclass friendly.

This commit is contained in:
Ben Alex
2004-08-02 23:08:52 +00:00
parent fe68741719
commit 0c43fe1f4a
2 changed files with 15 additions and 1 deletions
@@ -202,11 +202,24 @@ public class SecurityEnforcementFilter implements Filter, InitializingBean {
"Access is denied - sending back forbidden response");
}
((HttpServletResponse) response).sendError(HttpServletResponse.SC_FORBIDDEN); // 403
sendAccessDeniedError(request, response);
} catch (Throwable otherException) {
throw new ServletException(otherException);
}
}
public void init(FilterConfig filterConfig) throws ServletException {}
/**
* Allows subclasses to override if required
*
* @param request
* @param response
*
* @throws IOException
*/
protected void sendAccessDeniedError(ServletRequest request,
ServletResponse response) throws IOException {
((HttpServletResponse) response).sendError(HttpServletResponse.SC_FORBIDDEN); // 403
}
}