Resolving invalid CSRF token values is not consistent #15184
Labels
in: messaging
An issue in spring-security-messaging
in: web
An issue in web modules (web, webmvc)
type: bug
A general bug
Milestone
Describe the bug
When CSRF tokens are modified client-side, resolving token values with the
Xor*
implementations is not consistent:CsrfToken
) is shorter than the provided token, a token of arbitrary length is resolvedCsrfToken
) is longer than the provided token, anArrayIndexOutOfBoundsException
is thrownExpected behavior
When CSRF tokens are modified client-side, resolving CSRF token values should be consistent:
null
null
Additionally, we should ensure the following edge cases are covered:
null
and noArrayIndexOutOfBoundsException
is thrownnull
and noArrayIndexOutOfBoundsException
is thrownContext
This issue was originally reported via gh-13310 and partially resolved in
6.2.0
.The text was updated successfully, but these errors were encountered: