Skip to content
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

FormFilter is matching encoded values against decoded values #3507

Open
rworsnop opened this issue Aug 26, 2024 · 0 comments
Open

FormFilter is matching encoded values against decoded values #3507

rworsnop opened this issue Aug 26, 2024 · 0 comments

Comments

@rworsnop
Copy link

This seems to be a bug in the class added as part of #3094.

Map<String, String[]> form = request.getParameterMap();
String queryString = request.getQueryString();

The first line gets decoded values; the second one does not.

So in the code further down that figures out whether something is a query param or not, it fails to correctly match the "form" parameter against a query parameter and then duplicates the query parameter in the form.

Downstream services will see this duplication. A Spring Web service using @RequestParam will see the parameter set to "foo,foo" instead of the expected "foo".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants
@rworsnop and others