Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[http-kernel] BC in Symfony 5.4 how sessions are handeled #44609

Unanswered
johannes85 asked this question in Q&A
Discussion options

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.

You must be logged in to vote

Replies: 0 comments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
🙏
Q&A
Labels
None yet
1 participant
Morty Proxy This is a proxified and sanitized view of the page, visit original site.