Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork5.3k
fixed example to check if the session exists when getting flash messages to avoid starting sessions when not needed#2564
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
fabpot commentedApr 26, 2013
| Q | A |
|---|---|
| Doc fix? | yes |
| New docs? | no |
| Applies to | all |
| Fixed tickets | symfony/symfony#6036 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
: should be::
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
fixed
…ges to avoid starting sessions when not needed
weaverryan commentedMay 4, 2013
Hey guys! Before I merge this, I want to make sure I'm not missing something. Why would the following situation not cause a problem:
Is there some mechanism that would avoid this issue? More broadly, after readingsymfony/symfony#6036, it sounds like we might need a small cookbook article on how to avoid starting the session (including the note about the flashbag and perhaps some notes about security). But we can handle that in another issue. Thanks! |
fabpot commentedMay 4, 2013
I don't understand how your scenario can happen. If you set something in the session in request 1, the session is going to be started in all sub-sequent requests. |
fixed example to check if the session exists when getting flash messages to avoid starting sessions when not needed
weaverryan commentedMay 5, 2013
I've also opened#2607 as a reminder to add a bit more about this topic. Thanks! |
TerjeBr commentedJul 15, 2013
@fabpot is wrong about this. The session is not automatically started in later requests if it has been started before. |