-
Notifications
You must be signed in to change notification settings - Fork 169
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
Double decoding of query parameters when creating Location #12354
Comments
Fix issue with URLDecoder handling of '+' character. Fixes #12354
Fix issue with URLDecoder handling of '+' character. Fixes #12354
Fix issue with URLDecoder handling of '+' character. Fixes #12354
Fix issue with URLDecoder handling of '+' character. Fixes #12354
Fix issue with URLDecoder handling of '+' character. Fixes #12354
Fix issue with URLDecoder handling of '+' character. Fixes #12354
Fix issue with URLDecoder handling of '+' character. Fixes #12354 Co-authored-by: caalador <[email protected]>
Fix issue with URLDecoder handling of '+' character. Fixes #12354 Co-authored-by: caalador <[email protected]>
Fix issue with URLDecoder handling of '+' character. Fixes #12354 Co-authored-by: caalador <[email protected]>
Fix issue with URLDecoder handling of '+' character. Fixes #12354 Co-authored-by: caalador <[email protected]>
This ticket/PR has been released with platform 14.8.0.beta1 and is also targeting the upcoming stable 14.8.0 version. |
This ticket/PR has been released with platform 14.7.8. |
This ticket/PR has been released with platform 22.0.1. |
This issue was solved by just handling the plus sign "+" special case, but something similar happens with the "%" character. |
When I open an URL with url encoded query parameters where a parameters contains a "+" symbol, the query parameter is incorrectly decoded twice and the "+" is removed from parameter value. This happens in
com.vaadin.flow.router.Location#Location(java.lang.String)
which calls thecom.vaadin.flow.router.LocationUtil#parseQueryParameters
where query string is first extractedquery = new java.net.URI(location).getQuery();
- this decodes the url encoded string for the first time, the string at this point is correct and "+" symbol gets decoded from "%2B". Next theQueryParameters.fromString(query)
is called which callscom.vaadin.flow.router.QueryParameters#makeQueryParamList
and this decodes the string again usingvalue = URLDecoder.decode(value, "utf-8");
- this removed the "+" symbol from the already decoded string and the parameter value is incorrect.E.g. the encoded parameter value
someValue1%2BsomeValue2
which should be decoded assomeValue1+someValue2
gets decoded assomeValue1 someValue2
instead which is wrong.Versions:
The text was updated successfully, but these errors were encountered: