Closed
Conversation
… been instantiated
Owner
|
This commit 7b02766 should fix this problem as the session is now initialized if not already provided before we check if a session exists (have a look at the changes to RequestListener.) |
This pull request was closed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This affects you if you do not have setup a session configuration yourself (thus no session implementation gets injected into the request), but you do call Request->getSession() from somewhere (e.g. your controller). Then a session with default values will be created.
Upon next request a call to ->hasSession() will return false if it is made before you again access the session from somewhere. This is incorrect since the session actually exists. Stateless requests are still possible and not affected by this.
While this commit fixes the problem, I think it would be cleaner if the decision - whether a session exists or not - was delegated to the concrete session / storage implementation. However, then we would always need an instance of the session which requires some more changes to the existing code to still support stateless requests.