mirror of
https://github.com/minio/minio.git
synced 2025-11-20 09:56:07 -05:00
fix: add helper for expected path.Clean behavior (#12068)
current usage of path.Clean returns "." for empty strings instead we need `""` string as-is, make relevant changes as needed.
This commit is contained in:
@@ -56,7 +56,7 @@ func (r Resource) Match(resource string, conditionValues map[string][]string) bo
|
||||
pattern = strings.Replace(pattern, key.VarName(), rvalues[0], -1)
|
||||
}
|
||||
}
|
||||
if path.Clean(resource) == pattern {
|
||||
if cp := path.Clean(resource); cp != "." && cp == pattern {
|
||||
return true
|
||||
}
|
||||
return wildcard.Match(pattern, resource)
|
||||
|
||||
Reference in New Issue
Block a user