[http-kernel] BC in Symfony 5.4 how sessions are handeled #44609
Unanswered
johannes85
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
In Symfony 5.4 there is a change in the AbstractSessionListener which causes it to put existing session cookies in the response header: symfony/http-kernel@8983be5#diff-f78b66c251522e67fb27c1dbea2a7e22f210e7d0427f6c5654e87d7a3f54a40c
In my opinion this behavior is fine but can cause problems for some usecases.
In my case I already have a session opened by another tool (SSO Login) which I reuse in Symfony by implementing a custom storage.
This worked fine up until 5.3 but breaks in 5.4 because Symfony now tries to delete the already existing session cookie since the session is empty. It also would recreate the cookie if the session is not empty whichI also don't want.
Is there anything I overlooked to avoid this behavior?
If not, I think there should be a switch to tell Symfony not to mess with existing sessions, which can be set in the session storage implementation.
Beta Was this translation helpful? Give feedback.
All reactions