You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug CsrfAuthenticationStrategy does not check for an existing token and always saves a null token when called. When used with CookieCsrfTokenRepository, this results in three Set-Cookie headers in the response. For example:
Note: The fix for gh-12141 addressed a related problem, originally discussed in gh-12094.
To Reproduce
See sample.
http :8080/login -a user:password
Observe that POST /login contains three Set-Cookie headers for XSRF-TOKEN.
Expected behavior
Because the request did not contain an XSRF-TOKEN cookie, only a single Set-Cookie header containing the generated token should be returned in the response.
Sample
Spring Security Version: 5.8.0-SNAPSHOT (after 6b0ed02).
Describe the bug
CsrfAuthenticationStrategy
does not check for an existing token and always saves anull
token when called. When used withCookieCsrfTokenRepository
, this results in threeSet-Cookie
headers in the response. For example:produces a response like:
Note: The fix for gh-12141 addressed a related problem, originally discussed in gh-12094.
To Reproduce
See sample.
http :8080/login -a user:password
POST /login
contains threeSet-Cookie
headers forXSRF-TOKEN
.Expected behavior
Because the request did not contain an
XSRF-TOKEN
cookie, only a singleSet-Cookie
header containing the generated token should be returned in the response.Sample
Spring Security Version: 5.8.0-SNAPSHOT (after 6b0ed02).
The text was updated successfully, but these errors were encountered: