From b5a6dd13959066fdf6625404752b81e5add2c8a7 Mon Sep 17 00:00:00 2001 From: Anis Elleuch Date: Sun, 2 Oct 2016 05:30:25 +0100 Subject: [PATCH] Avoid path-cleaning policy resources for a better compliance with S3 (#2823) --- cmd/bucket-policy-parser.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cmd/bucket-policy-parser.go b/cmd/bucket-policy-parser.go index 51aaf9e96..23685656d 100644 --- a/cmd/bucket-policy-parser.go +++ b/cmd/bucket-policy-parser.go @@ -23,7 +23,6 @@ import ( "errors" "fmt" "io" - "path" "sort" "strings" @@ -224,7 +223,7 @@ func resourcePrefix(resource string) string { if strings.HasSuffix(resource, "*") { resource = strings.TrimSuffix(resource, "*") } - return path.Clean(resource) + return resource } // checkBucketPolicyResources validates Resources in unmarshalled bucket policy structure.