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

[SecurityBundle] Fix switch_user provider configuration handling #34759

Merged
merged 1 commit into from Dec 3, 2019

Conversation

fancyweb
Copy link
Contributor

@fancyweb fancyweb commented Dec 2, 2019

Q A
Branch? 4.4
Bug fix? yes
New feature? no
Deprecations? no
Tickets -
License MIT
Doc PR -

The default provider here can be null if there are multiple configured providers configured + the firewall doesn't define its provider at the root level + it is anonymous, ie:

providers:
    my_provider:
        # ...
    monitor_provider:
        # ...
firewalls:
    main:
        switch_user:
            provider: my_provider
        anonymous: true
        # ...

@chalasr
Copy link
Member

chalasr commented Dec 2, 2019

Can you add a test case? Maybe update

public function testPerListenerProviderWithRememberMeAndAnonymous()

@fancyweb fancyweb force-pushed the security-bundle-switch-user-fix branch from 7353c64 to 417169b Compare December 2, 2019 16:24
@fancyweb
Copy link
Contributor Author

fancyweb commented Dec 2, 2019

Done.

@chalasr
Copy link
Member

chalasr commented Dec 3, 2019

Good catch, thanks @fancyweb.

chalasr pushed a commit that referenced this pull request Dec 3, 2019
…ndling (fancyweb)

This PR was merged into the 4.4 branch.

Discussion
----------

[SecurityBundle] Fix switch_user provider configuration handling

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | -
| License       | MIT
| Doc PR        | -

The default provider here can be null if there are multiple configured providers configured + the firewall doesn't define its provider at the root level + it is anonymous, ie:
```yaml
providers:
    my_provider:
        # ...
    monitor_provider:
        # ...
firewalls:
    main:
        switch_user:
            provider: my_provider
        anonymous: true
        # ...
```

Commits
-------

417169b [SecurityBundle] Fix switch_user provider configuration handling
@chalasr chalasr merged commit 417169b into symfony:4.4 Dec 3, 2019
@fancyweb fancyweb deleted the security-bundle-switch-user-fix branch December 3, 2019 20:52
This was referenced Dec 19, 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

4 participants