From eed756777b0ddbe6e132ab664d74de0b26735983 Mon Sep 17 00:00:00 2001 From: Harshavardhana Date: Thu, 28 Apr 2016 13:29:32 -0700 Subject: [PATCH] object: Allow '[' and ']' as part of object names. --- object-utils.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/object-utils.go b/object-utils.go index 4c0cc7726..88544047c 100644 --- a/object-utils.go +++ b/object-utils.go @@ -58,8 +58,6 @@ func IsValidBucketName(bucket string) bool { // - Caret ("^") // - Right curly brace ("}") // - Grave accent / back tick ("`") -// - Right square bracket ("]") -// - Left square bracket ("[") // - Tilde ("~") // - 'Greater Than' symbol (">") // - 'Less Than' symbol ("<") @@ -72,7 +70,7 @@ func IsValidObjectName(object string) bool { return false } // Reject unsupported characters in object name. - return !strings.ContainsAny(object, "`^*{}[]|\\\"'") + return !strings.ContainsAny(object, "`^*{}|\\\"'") } // IsValidObjectPrefix verifies whether the prefix is a valid object name.