mirror of
https://github.com/minio/minio.git
synced 2025-01-25 21:53:16 -05:00
Fixing regex
This commit is contained in:
parent
856781b2a4
commit
53a8536984
@ -55,6 +55,6 @@ func IsValidBucket(bucket string) bool {
|
|||||||
if match, _ := regexp.MatchString("\\.\\.", bucket); match == true {
|
if match, _ := regexp.MatchString("\\.\\.", bucket); match == true {
|
||||||
return false
|
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
|
return match
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user