mirror of
https://github.com/spring-projects/spring-security.git
synced 2025-06-15 16:42:14 +00:00
SEC-2832: Update request attributes with new CsrfToken
This commit is contained in:
parent
27c7cd150b
commit
aa0a5b96ab
@ -56,6 +56,8 @@ public final class CsrfAuthenticationStrategy implements
|
||||
CsrfToken newToken = this.csrfTokenRepository.generateToken(request);
|
||||
this.csrfTokenRepository.saveToken(null, request, response);
|
||||
this.csrfTokenRepository.saveToken(newToken, request, response);
|
||||
request.setAttribute(CsrfToken.class.getName(), newToken);
|
||||
request.setAttribute(newToken.getParameterName(), newToken);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user