Avoid reviewer privilege escalation vulnerability#25101
Conversation
5410ff0 to
fd4494e
Compare
849cd94 to
992852e
Compare
| can_access_because_admin = acl.action_allowed_for( | ||
| request.user, amo.permissions.ADDONS_EDIT | ||
| ) |
There was a problem hiding this comment.
In a similar vein to my other comment: let's explicitly require GroupPermission(amo.permissions.ADDONS_EDIT) in the list of permissions in views that need to allow that instead of making that permission class harder to follow.
There was a problem hiding this comment.
The original class allowed admins to use unsafe methods, should I interpret this as similarly limiting admins as well then?
There was a problem hiding this comment.
Yes, users with ADDONS_EDIT are currently allowed to use unsafe methods everywhere when dealing with addons. (We might want to remove that in the future, very few folks have that permission and they very rarely need to make modifications anyway - but let's keep it for now)
| can_access_because_admin = acl.action_allowed_for( | ||
| request.user, amo.permissions.ADDONS_EDIT |
bdbb9e7 to
84bc0c3
Compare
84bc0c3 to
b6f567a
Compare
diox
left a comment
There was a problem hiding this comment.
Can you also add an integration test in addons/tests/test_views.py proving the original issue reported in the bug is fixed ?
362c896 to
cb5bed9
Compare
Fixes bug 2033254.
#ISSUENUMat the top of your PR to an existing open issue in the mozilla/addons repository.