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

[Security] SwitchUser is broken when the User Provider always returns a valid user #34551

Merged
merged 1 commit into from Nov 24, 2019

Conversation

tucksaun
Copy link
Contributor

Q A
Branch? 4.3
Bug fix? yes
New feature? no
Deprecations? no
Tickets n/a
License MIT
Doc PR n/a

Since bcfc282, if a UserProvider always returns a valid User object (which can happen in some OAuth workflow), switching user is not possible anymore as we hit the LogicException.

This patch should be safe as the timing-attack prevention is kept.

@fabpot
Copy link
Member

fabpot commented Nov 24, 2019

Thank you @tucksaun.

fabpot added a commit that referenced this pull request Nov 24, 2019
…ays returns a valid user (tucksaun)

This PR was merged into the 4.3 branch.

Discussion
----------

[Security] SwitchUser is broken when the User Provider always returns a valid user

| Q             | A
| ------------- | ---
| Branch?       | 4.3
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | n/a
| License       | MIT
| Doc PR        | n/a

Since bcfc282, if a UserProvider always returns a valid User object (which can happen in some OAuth workflow), switching user is not possible anymore as we hit the `LogicException`.

This patch should be safe as the timing-attack prevention is kept.

Commits
-------

2bf6cd2 [Security] Fix SwitchUser is broken when the User Provider always returns a valid user
@fabpot fabpot merged commit 2bf6cd2 into symfony:4.3 Nov 24, 2019
This was referenced Dec 1, 2019
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

6 participants