Skip to content

[SecurityBundle] Link UserProviderListener to correct firewall dispatcher #41509

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
Jun 3, 2021

Conversation

Matth--
Copy link
Contributor

@Matth-- Matth-- commented Jun 2, 2021

Q A
Branch? 5.2
Bug fix? yes
New feature? no
Deprecations? no
Tickets Fix #40158 , Fix #41474
License MIT
Doc PR /

When using the new AuthenticationManager, an incorrect UserProvider could be attached to the UserBadge when having multiple providers defined in security.yaml.

The UserProviderListener was tagged to the global event dispatcher instead of the dispatcher for the specific firewall.

@Matth-- Matth-- requested review from chalasr and wouterj as code owners June 2, 2021 09:32
@Matth-- Matth-- changed the base branch from 5.4 to 5.2 June 2, 2021 09:33
@carsonbot carsonbot added this to the 5.2 milestone Jun 2, 2021
@nicolas-grekas
Copy link
Member

Can you please add a test case if possible?

@Matth-- Matth-- force-pushed the fix/user-provider-listener branch 2 times, most recently from 79d3ab1 to d65695d Compare June 2, 2021 11:29
@Matth--
Copy link
Contributor Author

Matth-- commented Jun 2, 2021

@nicolas-grekas I added some functional tests (Feel like this was the better way to get failing tests first).
The tests were failing without the change to the SecurityExtension class.

Do you have a suggestion to fix the Travis ci bugs? I feel like it used the Symfony 5.4 branch to run tests against.

@Matth-- Matth-- force-pushed the fix/user-provider-listener branch from d65695d to 0a713f2 Compare June 2, 2021 12:33
@derrabus
Copy link
Member

derrabus commented Jun 2, 2021

Do you have a suggestion to fix the Travis ci bugs?

I'd say, the Travis failure is unrelated to your changes.

@Matth-- Matth-- force-pushed the fix/user-provider-listener branch from 0a713f2 to 46bdeb8 Compare June 2, 2021 19:07
@nicolas-grekas
Copy link
Member

Thank you @Matth--.

@nicolas-grekas nicolas-grekas merged commit 1ec9a83 into symfony:5.2 Jun 3, 2021
@Matth-- Matth-- deleted the fix/user-provider-listener branch June 3, 2021 16:53
@Matth-- Matth-- restored the fix/user-provider-listener branch June 3, 2021 16:54
@Matth-- Matth-- deleted the fix/user-provider-listener branch June 3, 2021 16:54
@fabpot fabpot mentioned this pull request Jun 17, 2021
@fabpot fabpot mentioned this pull request Jun 30, 2021
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.

[Security][Authenticator-based] Multiple providers
6 participants