Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[Acl] altered the behaviour of RoleSecurityIdentity#5076

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Closed
binabik wants to merge1 commit intosymfony:2.0frombinabik:ticket_5026
Closed

[Acl] altered the behaviour of RoleSecurityIdentity#5076

binabik wants to merge1 commit intosymfony:2.0frombinabik:ticket_5026

Conversation

@binabik
Copy link

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: 5026
Todo: -
License of the code: MIT
Documentation PR: -

Implemented the change I documented in ticket#5206: the constructor checks for an instance of RoleInterface rather than Role.

@vicb
Copy link
Contributor

This change has been rejected before (see#1748).

@schmittjoh may be you could explain what vulnerability it would introduce and add a comment in the file ?

@binabik
Copy link
Author

Not allowing this change makes ACLs useless if you use Roles from a database. as documented inhttp://symfony.com/doc/master/cookbook/security/entity_provider.html#managing-roles-in-the-database .

Could someone elaborate on the security vulnerability exposed by this change? We intend to setup an ACL based system relying heavily on Roles stored in the database. Of course, I could reimplement the ACL system so it does what we need, but this simple change in the default system fixes the problem.

I can think of at least 2 alternative fixes, one of which would involve changing some code in Symfony\Component\Security\Acl\Domain\SecurityIdentityRetrieval; the other would involve changing our user implementation to return an array of Strings from User::getRoles(). However, I have no idea if that would break other compatibility.

So, once again: please elaborate on the security vulnerability. After spending 1-2 days digging through the code to find this bug, i can't see any vulnerability. However,@schmittjoh will certainly know his code better.

regards,
sb

@gergelypolonkai
Copy link

Although I won't mark it as a security vulnerability, it still renders Role-based ACLs unusable if Roles are coming from the ORM instead of config.yml, as@binabik said. I have just ran into such a problem and discussed it on the Symfony2 Google Groups list:

https://groups.google.com/forum/?fromgroups=#!topic/symfony2/kviy-DKUSOI

@gergelypolonkai
Copy link

After making my modifications in my RoleHierarchy class to return an array of strings instead of an array of MyRole entities, the core RoleVoter stops working. Please solve this issue somehow, this makes ORM-based roles totally unworthy.

@stof
Copy link
Member

@schmittjoh could you explain exactly why you rejected this change inaf70ac8 ? We currently have at least 3 PR asking for this change (as well as a few closed ones). Having the explanation would avoid further ones.

@stloydstloyd mentioned this pull requestNov 14, 2012
m14t added a commit to m14t/symfony-docs that referenced this pull requestApr 23, 2013
The documentation seems to assume the implementation present in commitsymfony/symfony#1673, which reverted soon after dueto a potential, but undisclosed security hole (citation@schmittjoh insymfony/symfony@af70ac8).This incorrect documentation has likely been the source of manyof the following issues:*symfony/symfony#1538 - [ACL RoleSecurityIdentity] check if instance of Role*symfony/symfony#1748 - Replace Role to RoleInterface for RoleSecurityIdentity*symfony/symfony#4309 - Issue related to custom group (role) and ACL/ACE*symfony/symfony#5026 - potential bug in Symfony\Component\Security\Acl\Domain\RoleSecurityIdentity*symfony/symfony#5076 - [Acl] altered the behaviour of RoleSecurityIdentity*symfony/symfony#5171 - Fix/role security identity*symfony/symfony#5303 - [Security] Check for RoleInterface instead of Role object in RoleSecurityIdentity*symfony/symfony#5909 - Allow Custom Roles to implement the RoleInterface*symfony/symfony#6012 - Securityidentity fix
@Tobion
Copy link
Contributor

Closed in favor of#8313

@TobionTobion closed thisJun 20, 2013
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

5 participants

@binabik@vicb@gergelypolonkai@stof@Tobion

[8]ページ先頭

©2009-2025 Movatter.jp