mirror of
https://github.com/minio/minio.git
synced 2024-12-24 06:05:55 -05:00
bucketPolicy: Trim incoming paths properly for policy verification.
This commit is contained in:
parent
07aa02f196
commit
85e2d886bc
@ -42,7 +42,7 @@ func enforceBucketPolicy(bucket string, action string, reqURL *url.URL) (s3Error
|
||||
}
|
||||
|
||||
// Construct resource in 'arn:aws:s3:::examplebucket/object' format.
|
||||
resource := AWSResourcePrefix + strings.TrimPrefix(reqURL.Path, "/")
|
||||
resource := AWSResourcePrefix + strings.TrimSuffix(strings.TrimPrefix(reqURL.Path, "/"), "/")
|
||||
|
||||
// Get conditions for policy verification.
|
||||
conditionKeyMap := make(map[string]set.StringSet)
|
||||
|
Loading…
Reference in New Issue
Block a user