[go: nahoru, domu]

Skip to content

Commit

Permalink
bucketPolicy: Trim incoming paths properly for policy verification.
Browse files Browse the repository at this point in the history
  • Loading branch information
harshavardhana committed Sep 11, 2016
1 parent 07aa02f commit 85e2d88
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/bucket-handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 85e2d88

Please sign in to comment.