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

AbstractFlashMapManager.isFlashMapForRequest does not inspect forwarded request coherently [SPR-15505] #20064

Closed
spring-issuemaster opened this issue May 2, 2017 · 1 comment

Comments

@spring-issuemaster
Copy link
Collaborator

commented May 2, 2017

Martin Svorc opened SPR-15505 and commented

org.springframework.web.servlet.support.AbstractFlashMapManager never matches a FlashMap if the request is forwarded after redirect.

The original URI is obtained using String requestUri = getUrlPathHelper().getOriginatingRequestUri(request);, which seems to be used to handle forwarded request.

The actual request params are on the other hand obtained using ServletUriComponentsBuilder.fromRequest(request).build().getQueryParams(), which returns the query parameters of the forwarded request (which differ from the originating request parameters) unlike in case of the URI.

The result is that the subsequent code never matches the FlashMap for the given forwarded request even though it should.


Affects: 4.3.1

Referenced from: pull request #1422, and commits 34f1712, bf83e4e, e0a7b07

@spring-issuemaster

This comment has been minimized.

Copy link
Collaborator Author

commented May 8, 2017

Martin Svorc commented

I've submitted a pull request solving this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.