-
Notifications
You must be signed in to change notification settings - Fork 38.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to retrieve FlashMap when contains "+"(half-space) in the request parameters [SPR-11821] #16441
Comments
Eujung Kim commented The parameter comparision logic in AbstractFlashMapManager.java has been fixed to use decoded value. |
Kazuki Shimizu commented Hi Eujung Probably, your modification is not correct. e.g.1)
e.g.2)
If possible, please confirm application behavior. |
Kazuki Shimizu commented Hi Rossen I sent the PR to solve this issue. |
Kazuki Shimizu commented Sorry. |
Rossen Stoyanchev commented The solution in the pull request with URLDecoder won't work because that class is meant for HTML form decoding and not URI decoding (check its Javadoc). What's encoding the space as "+"? It should be encoded as %20. For further background you can also check the comments under #10187. |
Kazuki Shimizu commented In RedirectView#urlEncode(String, String), " " has encoded to "+" using java.net.URLEncoder.encode(String, String). |
Rossen Stoyanchev commented Yes indeed. You can work around this by using a URI variable in the redirect string, e.g. Both of these of course are workarounds. I am going to link this to #16543 to be considered as part of a broader effort to address such issues. |
Kazuki Shimizu commented
thank you for advice. If override, following implementation is correct ? RediretView#urlEncode
Sub-class
|
Kazuki Shimizu commented I had tried the way to using a URI variable in the redirect string. Probably this behavior is bug ... |
Kazuki Shimizu commented I want modify the RediretView#urlEncode implementation as following:
|
Kazuki Shimizu commented I tried modify again. Please review this PR. |
Rossen Stoyanchev commented Thanks, what you did should work but is guaranteed to cause regressions to existing applications. As I indicated above we will need to find another way to address this, perhaps together with #16543 which is about configuring centrally URI encoding related options and using them consistently throughout the framework. |
Kazuki Shimizu commented I understand. |
Rossen Stoyanchev commented This should be fixed after #17170 was resolved. |
Kazuki Shimizu opened SPR-11821 and commented
Probably, URL decode processing are wrong in AbstractFlushMapManager#decodeParameters.
e.g.)
Controller's logic is follows :
redirect url is follows:
FlashMap#getTargetRequestParams() is follows:
I think value of "ab" parameter should be "a b".
Affects: 3.2.9
Reference URL: #16129
Issue Links:
0 votes, 5 watchers
The text was updated successfully, but these errors were encountered: