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 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

This comment has been minimized.

Copy link
Member

chalasr commented Dec 2, 2019

Can you add a test case? Maybe update

public function testPerListenerProviderWithRememberMeAndAnonymous()

@fancyweb fancyweb force-pushed the fancyweb:security-bundle-switch-user-fix branch from 7353c64 to 417169b Dec 2, 2019
@fancyweb

This comment has been minimized.

Copy link
Contributor Author

fancyweb commented Dec 2, 2019

Done.

@chalasr
chalasr approved these changes Dec 2, 2019
@chalasr

This comment has been minimized.

Copy link
Member

chalasr commented Dec 3, 2019

Good catch, thanks @fancyweb.

chalasr added 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
3 checks passed
3 checks passed
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
fabbot.io Your code looks good.
Details
@fancyweb fancyweb deleted the fancyweb:security-bundle-switch-user-fix branch Dec 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.