Skip to content
This repository has been archived by the owner on Jan 8, 2020. It is now read-only.

Fixed #3454. #3479

Closed
wants to merge 4 commits into from
Closed

Fixed #3454. #3479

wants to merge 4 commits into from

Conversation

jacobkiers
Copy link
Contributor

As stated in the my comment in #3454, access to a resource is denied with a global deny policy and a permission on a parent.

This PR just adds a test to show the behaviour. I might be able to write a fix, but I'm not yet sure of that. The ACL code is quite complex 😄

Jacob Kiers added 2 commits January 18, 2013 10:14
The fix involves forcing a loop through the parent resources when the
current resource is 'TYPE_DENIED'. The loop stops when we are already at
the top-level resource.
@jacobkiers
Copy link
Contributor Author

I've just updated this PR with a fix.

With the previous version, a deny() on a lower-lever resource was not
inherited when on a higher-lever resource an allow() was given.

See the updated test for more an example.
@jacobkiers
Copy link
Contributor Author

I found that some privilege escaliation is possible when inheritance does not work corectly. I will check somewhere tonight if this is due to my previous changes, or that it also happens in the master branch.

For now, could someone please review these changes? Thanks!

@jacobkiers
Copy link
Contributor Author

@Maks3w I've tested this on the master branch (just the tests), and found that the privilege escalation issue is there too.

What do you propose? Backporting this one or sending in a new PR with just the changes needed to fix the security issue?

@weierophinney
Copy link
Member

@jacobkiers I'd suggest backporting the fix for the escalation issue to master via another PR. We can merge both at the same time.

@weierophinney
Copy link
Member

@jacobkiers Actually, if you don't mind, I'll simply cherry-pick it into master. This will rewrite history, so you'll need to do a 'reset --hard upstream/master` (as well as upstream/develop) after merged.

weierophinney added a commit that referenced this pull request Jan 18, 2013
@ghost ghost assigned weierophinney Jan 18, 2013
@jacobkiers
Copy link
Contributor Author

@weierophinney I don't mind at all. That means these fixes will make it into 2.0.7, right? That would make me really happy 😄

@jacobkiers jacobkiers deleted the zf3454 branch January 18, 2013 22:12
@weierophinney
Copy link
Member

Definitely 2.1.0 -- most likely we'll also cut a 2.0.7 at the time we
release 2.1.0, as this and a few other issues would be good to have in the
2.0.* series in an official release.

On Fri, Jan 18, 2013 at 4:11 PM, Jacob Kiers notifications@github.comwrote:

@weierophinney /~https://github.com/weierophinney I don't mind at all.
That means these fixes will make it into 2.0.7, right? That would make me
really happe [image: 😄]


Reply to this email directly or view it on GitHub/~https://github.com//pull/3479#issuecomment-12443339.

Matthew Weier O'Phinney
matthew@weierophinney.net
http://mwop.net/

weierophinney added a commit to zendframework/zend-permissions-acl that referenced this pull request May 15, 2015
weierophinney added a commit to zendframework/zend-permissions-acl that referenced this pull request May 15, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants