Skip to content

Commit

Permalink
Account for case when token's scope does not contain type/resource/ac…
Browse files Browse the repository at this point in the history
…tion.

closes pulp#509
  • Loading branch information
ipanova committed Jan 22, 2022
1 parent a9f61cc commit a94b7ff
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGES/509.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Account for case when token's scope does not contain type/resource/action.
2 changes: 1 addition & 1 deletion pulp_container/app/authorization.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ def determine_access(self):
endpoint.
"""
if not self.scope:
if not self.scope or self.scope.count(":") != 2:
return []

typ, name, actions = self.scope.split(":")
Expand Down

0 comments on commit a94b7ff

Please sign in to comment.