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

Fix/role security identity#5171

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
wimvds wants to merge3 commits intosymfony:masterfromwimvds:fix/role_security_identity
Closed

Fix/role security identity#5171

wimvds wants to merge3 commits intosymfony:masterfromwimvds:fix/role_security_identity

Conversation

@wimvds
Copy link

We're using our own Role object that implements RoleInterface and the Acl didn't work because of the fact that RoleSecurityIdentity checked on the objects passed being an instance of Role instead of RoleInterface...

I also added some extra sanity checks in the constructor and tests for them.

@stof
Copy link
Member

stof commentedAug 3, 2012

@schmittjoh As you previously rejected such change saying it was a security issue, please explain why (and add a comment in the code to avoid later changes)

@travisbot
Copy link

This pull requestpasses (mergedd624d1d into48e384b).

@vicb
Copy link
Contributor

vicb commentedAug 6, 2012

similar PR:#5076

@mevers47
Copy link
Contributor

We're also using RoleInterface. This would be really nice to have, as it makes Symfony2 even more flexible. Please@schmittjoh why is it a security vulnerability?

@mevers47
Copy link
Contributor

A quick and dirty workaround that worked for me:

In my app/config/config.xml

    <parameters>        <parameterkey="security.acl.security_identity_retrieval_strategy.class">{my bundle}\Security\Acl\Domain\SecurityIdentityRetrievalStrategy</parameter>    </parameters>

Copy SecurityIdentityRetrievalStrategy to {my bundle}\Security\Acl\Domain\SecurityIdentityRetrievalStrategy
Copy RoleSecurityIdentity to {my bundle}\Security\Acl\Domain\RoleSecurityIdentity
Patch your own RoleSecurityIdentity with this PR (da5ec3b)
Do not forget to change the "equals" method like so:

/**     * {@inheritDoc}     */publicfunctionequals(SecurityIdentityInterface$sid)    {if (!$sidinstanceof RoleSecurityIdentity && !$sidinstanceof SymfonyRoleSecurityIdentity) {returnfalse;        }return$this->role ===$sid->getRole();    }

@kimausloos
Copy link

Any news about this?

@sstok
Copy link
Contributor

@schmittjoh ping

@fabpot
Copy link
Member

Closing as this is a duplicate.

@fabpotfabpot closed thisNov 9, 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
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.

8 participants

@wimvds@stof@travisbot@vicb@mevers47@kimausloos@sstok@fabpot

[8]ページ先頭

©2009-2025 Movatter.jp