forked from TrueCloudLab/distribution
Docker Tag command: Relax the restriction on namespace (username) length from 30 to 255 characters.
Signed-off-by: Shishir Mahajan <shishir.mahajan@redhat.com>
This commit is contained in:
parent
c5c507bb14
commit
dc4e9c6e90
2 changed files with 11 additions and 5 deletions
|
@ -223,8 +223,8 @@ func validateRemoteName(remoteName string) error {
|
|||
if !validNamespaceChars.MatchString(namespace) {
|
||||
return fmt.Errorf("Invalid namespace name (%s). Only [a-z0-9-_] are allowed.", namespace)
|
||||
}
|
||||
if len(namespace) < 4 || len(namespace) > 30 {
|
||||
return fmt.Errorf("Invalid namespace name (%s). Cannot be fewer than 4 or more than 30 characters.", namespace)
|
||||
if len(namespace) < 2 || len(namespace) > 255 {
|
||||
return fmt.Errorf("Invalid namespace name (%s). Cannot be fewer than 2 or more than 255 characters.", namespace)
|
||||
}
|
||||
if strings.HasPrefix(namespace, "-") || strings.HasSuffix(namespace, "-") {
|
||||
return fmt.Errorf("Invalid namespace name (%s). Cannot begin or end with a hyphen.", namespace)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue