Skip to content
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

[HttpKernel] Fix setting the session on the main request when it's started by a subrequest #49265

Merged
merged 1 commit into from
Feb 13, 2023

Conversation

nicolas-grekas
Copy link
Member

@nicolas-grekas nicolas-grekas commented Feb 6, 2023

Q A
Branch? 5.4
Bug fix? yes
New feature? no
Deprecations? no
Tickets -
License MIT
Doc PR -

When a sub-request starts the session (eg when app.flashes is used in a template), the main request remains unaware of it and so does SessionListener as a consequence. This prevents it from running its onKernelResponse logic, leading to e.g. a Set-Cookie being sent on such pages even when a session is already active.

@carsonbot carsonbot added this to the 5.4 milestone Feb 6, 2023
@nicolas-grekas nicolas-grekas merged commit 737cc4c into symfony:5.4 Feb 13, 2023
This was referenced Feb 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants