From 77a5514578c5d67d46cbe5db261efba541e0c586 Mon Sep 17 00:00:00 2001 From: restitux Date: Fri, 24 Feb 2023 22:29:21 -0700 Subject: [PATCH] Fix secret name validation not checking for beginning of string --- database/func.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/database/func.go b/database/func.go index ec588de..6b6eada 100644 --- a/database/func.go +++ b/database/func.go @@ -449,7 +449,7 @@ func (db *Database) CreateSecret(name string, secret string) (Secret, error) { return s, fmt.Errorf("secret name must be 256 characters or less") } - validName := regexp.MustCompile(`^[A-Z0-9_]+$`) + validName := regexp.MustCompile(`[A-Z0-9_]+$`) if !validName.MatchString(name) { return s, fmt.Errorf("secren name must be made up of only uppercase letters, numbers, and underscores") }