Browse Source

SEC-1462: Added suggested patch (effectively the same as changes in 3.0.x and master branches).

2.0.x
Luke Taylor 16 years ago
parent
commit
0acf262546
  1. 2
      core/src/main/java/org/springframework/security/ui/SessionFixationProtectionFilter.java

2
core/src/main/java/org/springframework/security/ui/SessionFixationProtectionFilter.java

@ -48,7 +48,7 @@ public class SessionFixationProtectionFilter extends SpringSecurityFilter {
protected void doFilterHttp(HttpServletRequest request, HttpServletResponse response, FilterChain chain) protected void doFilterHttp(HttpServletRequest request, HttpServletResponse response, FilterChain chain)
throws IOException, ServletException { throws IOException, ServletException {
// Session fixation isn't a problem if there's no session // Session fixation isn't a problem if there's no session
if(request.getSession(false) == null || request.getAttribute(FILTER_APPLIED) != null) { if(request.getSession(false) == null || request.getAttribute(FILTER_APPLIED) != null || !request.isRequestedSessionIdValid()) {
chain.doFilter(request, response); chain.doFilter(request, response);
return; return;
} }

Loading…
Cancel
Save