Skip to content

complete login with user we're impersonating #17245

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

Conversation

i-just
Copy link
Contributor

@i-just i-just commented May 9, 2025

Description

When a user without 2fa impersonates another user and needs to elevate their session via the password route, ensure that after authentication, we use the user that’s being impersonated to complete the login.

Steps to reproduce:

  • clean 5.7.5 Pro installation
  • create user A and activate their account (set a password)
  • create user B and activate their account (set a password)
  • login as user A, edit user B and use “Sign in as” to impersonate user B
  • go to My Account > Password & Verification and click “Set up” for the “Authenticator App”
  • when the elevated session modal pops up, provide the password for user A and submit the form
  • close the “Authenticator App” slideout and reload the page
  • notice that you’re now logged in as user A again

Tested that this issue did not occur if user A had 2fa set up or if they were elevating their session with a passkey.

Related issues

n/a

@i-just i-just requested a review from brandonkelly May 9, 2025 08:05
@brandonkelly brandonkelly merged commit dbd9a68 into 5.x May 12, 2025
@brandonkelly brandonkelly deleted the bugfix/impersonation-and-elevated-session-without-2sv branch May 12, 2025 22:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants