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

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

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

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 requested a review from stof February 10, 2023 11:10
@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.

2 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.