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

[Security] Fix impersonation being deauthenticated on every request#64213

Merged
nicolas-grekas merged 1 commit into
symfony:7.4symfony/symfony:7.4from
nicolas-grekas:sec-impnicolas-grekas/symfony:sec-impCopy head branch name to clipboard
May 15, 2026
Merged

[Security] Fix impersonation being deauthenticated on every request#64213
nicolas-grekas merged 1 commit into
symfony:7.4symfony/symfony:7.4from
nicolas-grekas:sec-impnicolas-grekas/symfony:sec-impCopy head branch name to clipboard

Conversation

@nicolas-grekas
Copy link
Copy Markdown
Member

@nicolas-grekas nicolas-grekas commented May 15, 2026

Q A
Branch? 7.4
Bug fix? yes
New feature? no
Deprecations? no
Issues Fix #64211
License MIT

In #64175 the ROLE_PREVIOUS_ADMIN role-check block was reintroduced in ContextListener::hasUserChanged() when merging from 6.4 up to 7.4. On 6.4 the matching half lives in SwitchUserListener, which appends ROLE_PREVIOUS_ADMIN to the token's roles; on 7.4+ that code was removed back in 2023 (#50957), so the check now sees a role-count mismatch on every refresh and deauthenticates the impersonation token.

This removes the stale half so the two halves stay consistent on 7.4+.

@nicolas-grekas nicolas-grekas merged commit 3789137 into symfony:7.4 May 15, 2026
12 of 14 checks passed
@nicolas-grekas nicolas-grekas deleted the sec-imp branch May 15, 2026 07:07
@talha-core
Copy link
Copy Markdown

I want this change rolled out urgently please

This was referenced May 20, 2026
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.

3 participants

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