Avoid reviewer privilege escalation vulnerability#25101
Open
chrstinalin wants to merge 1 commit into
Open
Conversation
5410ff0 to
fd4494e
Compare
849cd94 to
992852e
Compare
diox
requested changes
Jul 3, 2026
Comment on lines
+203
to
+205
| can_access_because_admin = acl.action_allowed_for( | ||
| request.user, amo.permissions.ADDONS_EDIT | ||
| ) |
Member
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.
Contributor
Author
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?
Member
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)
Comment on lines
+240
to
+241
| can_access_because_admin = acl.action_allowed_for( | ||
| request.user, amo.permissions.ADDONS_EDIT |
bdbb9e7 to
84bc0c3
Compare
84bc0c3 to
b6f567a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes bug 2033254.
#ISSUENUMat the top of your PR to an existing open issue in the mozilla/addons repository.