Fix secret name validation not checking for beginning of string
This commit is contained in:
+1
-1
@@ -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")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user