-
Notifications
You must be signed in to change notification settings - Fork 57
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
Fix EZP-28612: Session is always started for anonymous user #241
Conversation
@Nattfarinn Guess you forgot to mention on slack you where going to look at it? Ref #240 |
@andrerom @Nattfarinn Damn :) |
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.
👍 |
Nice! :) What about template change in #240 about using EDIT: It should work without it, |
@emodric Even if it would start, it's not required. This "if" is a good practice to avoid anonymous session starts, but in this case it's used inside Admin panel so you do have session anyway. :) |
@Nattfarinn Well, not always. That layout template is also used as a layout for the login page, so just by displaying a login page, session would start if we were on lower versions of Symfony :) EDIT: On the other hand, rendering the CSRF token in the login page does require the session, so it really doesn't matter after all :D |
This refactors a bit
FlashBagNotificationHandler
in order not to start the session for anonymous user, by calling thegetFlashBag
only when neeeded, since it is responsible for starting the session.Checklist:
$ composer fix-cs
)