From 53a8536984709664594d653e89477bfcdc7ef6f5 Mon Sep 17 00:00:00 2001 From: "Frederick F. Kautz IV" Date: Wed, 21 Jan 2015 15:28:39 -0800 Subject: [PATCH] Fixing regex --- pkg/storage/storage.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/storage/storage.go b/pkg/storage/storage.go index 0d4e7a719..9d56c2c19 100644 --- a/pkg/storage/storage.go +++ b/pkg/storage/storage.go @@ -55,6 +55,6 @@ func IsValidBucket(bucket string) bool { if match, _ := regexp.MatchString("\\.\\.", bucket); match == true { return false } - match, _ := regexp.MatchString("[a-zA-Z0-9\\.\\-]", bucket) + match, _ := regexp.MatchString("^[a-zA-Z][a-zA-Z0-9\\.\\-]+[a-zA-Z0-9]$", bucket) return match }