Skip to content

Fix HttpSessionRequestCache#getMatchingRequest query string parsing #16914

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

Open
wants to merge 1 commit into
base: 6.4.x
Choose a base branch
from

Conversation

Kehrlann
Copy link
Contributor

@Kehrlann Kehrlann commented Apr 9, 2025

Issue

URL parsing changed in framework 6.2 (security 6.4), and now fails when path contains a % sign. As a result, the HttpSessionRequestCache fails on every request where the path contains a % sign.

Resolution

We do not need to parse a full URL, just to inspect the query string for the matching parameter. We don't use the current request path in UriComponentsBuilder to extract the query string.

Fixes gh-16656

- URL parsing changed in framework 6.2, and fails when path contains a % sign.
- The HttpSessionRequestCache only needs to inspect the query string, not the full URL.

Fixes spring-projectsgh-16656

Signed-off-by: Daniel Garnier-Moiroux <[email protected]>
@Kehrlann Kehrlann changed the title Fix HttpSessionRequestCache#getMatchingRequest query string parsing Fix HttpSessionRequestCache#getMatchingRequest query string parsing Apr 9, 2025
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Apr 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: waiting-for-triage An issue we've not yet triaged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants