From 7fd1882dbb32532ff91eca0832495861bb7840d1 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Wed, 11 Mar 2020 00:37:02 -0400 Subject: [PATCH] fix: correct regex for invalid app names --- plugins/common/common.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/common/common.go b/plugins/common/common.go index 17832f43c..83f4f1555 100644 --- a/plugins/common/common.go +++ b/plugins/common/common.go @@ -573,7 +573,7 @@ func IsValidAppName(appName string) error { return fmt.Errorf("APP must not be null") } - r, _ := regexp.Compile("^[a-z0-9].*") + r, _ := regexp.Compile("^[a-z0-9][^:A-Z]*$") if r.MatchString(appName) { return nil } @@ -583,7 +583,7 @@ func IsValidAppName(appName string) error { os.RemoveAll(appRoot) } - return errors.New("App name must begin with lowercase alphanumeric character") + return errors.New("App name must begin with lowercase alphanumeric character, and cannot include uppercase characters or colons") } // VerifyAppName verifies app name format and app existence"