Skip to content

Commit

Permalink
Fix delete-resource authz check.
Browse files Browse the repository at this point in the history
  • Loading branch information
nomeguy committed Mar 11, 2022
1 parent e7018e3 commit 37a26e2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions routers/authz_filter.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ func getObject(ctx *context.Context) (string, string) {

if path == "/api/delete-resource" {
tokens := strings.Split(obj.Name, "/")
if len(tokens) >= 2 {
obj.Name = tokens[len(tokens)-2]
if len(tokens) >= 5 {
obj.Name = tokens[4]
}
}

Expand Down

0 comments on commit 37a26e2

Please sign in to comment.