CookieRequestCache handles URL encoded query parameters incorrectly #9203
Labels
in: web
An issue in web modules (web, webmvc)
status: backported
An issue that has been backported to maintenance branches
type: bug
A general bug
Milestone
Describe the bug
CookieRequestCache
is used to save a request which contains an URL encoded query parameter. After restoring the saved request the request contains two values for this query parameter, the URL encoded and decoded form. IfHttpSessionRequestCache
is used, the query parameter is only present once, in decoded form.Tested with Spring-Security 5.4.1.
To Reproduce
https://start.spring.io,https%3A%2F%2Fstart.spring.io
Optional steps to see the difference to
HttpSessionRequestCache
:4. Change the used
RequestCache
inRequestCacheConfiguration
toHttpSessionRequestCache
(in the sample project)5. Visit the url from step 2
6. The output is:
https://start.spring.io
Expected behavior
The query parameter should only be present in decoded form. Therefore the output in step 3 should be
https://start.spring.io
.Sample
demo.zip
The text was updated successfully, but these errors were encountered: