-
-
Notifications
You must be signed in to change notification settings - Fork 9.8k
[Security] Complain about an empty decision strategy #29981
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
Conversation
44fb1ff to
35d3cc8
Compare
src/Symfony/Component/Security/Core/Authorization/AccessDecisionManager.php
Outdated
Show resolved
Hide resolved
|
The actual issue is of course that the method names are not prefix-free. |
35d3cc8 to
ab12ca8
Compare
xabbuh
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should rather check that the passed value is not an empty string. The proposed solution has the drawback that it will fail again in the future if we introduce a doDecide() method for whatever reason.
ab12ca8 to
c537c85
Compare
c537c85 to
42e34f4
Compare
src/Symfony/Component/Security/Core/Authorization/AccessDecisionManager.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/Security/Core/Authorization/AccessDecisionManager.php
Outdated
Show resolved
Hide resolved
42e34f4 to
88502a5
Compare
88502a5 to
228329a
Compare
228329a to
21f73d2
Compare
21f73d2 to
3a22cad
Compare
|
I applied the requested changes; the label didn’t change, though. |
|
Thank you @corphi. |
This PR was merged into the 3.4 branch. Discussion ---------- [Security] Complain about an empty decision strategy | Q | A | ------------- | --- | Branch? | 3.4 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | - When an empty string is passed (or objects with a similarly behaving `__toString()` method) to the constructor, the call to `decide` causes infinite recursion. Commits ------- 3a22cad Fix infinite recursion when passed an empty string
When an empty string is passed (or objects with a similarly behaving
__toString()method) to the constructor, the call todecidecauses infinite recursion.