Skip to content

[Security] AbstractVoter should abstain string objects #16531

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

Closed

Conversation

Haehnchen
Copy link
Contributor

Q A
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
License MIT

The AbstractVoter is trying to get a class of an object, but if i pass a string to isGranted is breaks the complete voting process. Noticed by adding only one Voter which extends thenAbstractVoter. So currently i am unable to use this abstract class in the whole project.
So we should not support string values in this voter.

$this->isGranted('VIEW', 'foo')

@stof
Copy link
Member

stof commented Nov 12, 2015

such usage is broken though. The second argument of isGranted is object|null, so strings are invalid.

@Haehnchen Haehnchen force-pushed the fix/abstract-voter-as-string branch from cae89ca to 1b86fc0 Compare November 12, 2015 14:01
@nicolas-grekas
Copy link
Member

See #16601

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.

5 participants