fs mode: List already existing buckets with capital letters (#7244)

if a bucket with `Captialized letters` is created, `InvalidBucketName` error
will be returned. 
In the case of pre-existing buckets, it will be listed.

Fixes #6938
This commit is contained in:
kannappanr
2019-03-05 10:42:32 -08:00
committed by GitHub
parent ef132c5714
commit c57159a0fe
5 changed files with 20 additions and 13 deletions

View File

@@ -30,6 +30,7 @@ import (
"github.com/minio/cli"
miniogopolicy "github.com/minio/minio-go/pkg/policy"
"github.com/minio/minio-go/pkg/s3utils"
minio "github.com/minio/minio/cmd"
xhttp "github.com/minio/minio/cmd/http"
"github.com/minio/minio/cmd/logger"
@@ -349,7 +350,7 @@ func ossIsValidBucketName(bucket string) bool {
if strings.Contains(bucket, ".") {
return false
}
if !minio.IsValidBucketName(bucket) {
if s3utils.CheckValidBucketNameStrict(bucket) != nil {
return false
}
return true