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

Passing more than one Security attribute to "Symfony\Component\Security\Core\Authorization\AccessDecisionManager::decide()" is not supported. #36280

Closed
Shoplifter opened this issue Mar 31, 2020 · 4 comments

Comments

@Shoplifter
Copy link
Contributor

Shoplifter commented Mar 31, 2020

Symfony version(s) affected: 5.0.7

Description
I just updated from 5.0.6 to 5.0.7 and now I'm running into this Exception after Log in. That happens only when in dev environment. It also does not happen if the access control lists only one role.
For example, when


        - { path: "^/admin/", roles: [ROLE_ADMIN, ROLE_PROJECTMANAGER, ROLE_ASSISTANT, ROLE_ACCOUNTANT] }
        - { path: "^/kunden/", roles: [ROLE_CLIENT] }

everything's fine for clients, but not for admins

symfony

@brunobart
Copy link

brunobart commented Mar 31, 2020

Hi,
Same think but in prod to.

[2020-03-31T06:07:30.543876+00:00] request.CRITICAL: Uncaught PHP Exception Symfony\Component\Security\Core\Exception\InvalidArgumentException: "Passing more than one Security attribute to "Symfony\Component\Security\Core\Authorization\AccessDecisionManager::decide()" is not supported." at /home/vetflow5/vendor/symfony/security-core/Authorization/AccessDecisionManager.php line 67 {"exception":"[object] (Symfony\\Component\\Security\\Core\\Exception\\InvalidArgumentException(code: 0): Passing more than one Security attribute to \"Symfony\\Component\\Security\\Core\\Authorization\\AccessDecisionManager::decide()\" is not supported. at /home/vetflow5/vendor/symfony/security-core/Authorization/AccessDecisionManager.php:67)"} []

@xabbuh
Copy link
Member

xabbuh commented Mar 31, 2020

Can you confirm that #36283 fixes this issue?

@brunobart
Copy link

brunobart commented Mar 31, 2020 via email

@smokezp
Copy link

smokezp commented Mar 31, 2020

+1 I have this issue in 5.5

nicolas-grekas added a commit that referenced this issue Mar 31, 2020
This PR was merged into the 4.4 branch.

Discussion
----------

[Security] forward multiple attributes voting flag

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

Commits
-------

1b7ec67 forward multiple attributes voting flag
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants