fix: allow UTF-8 (Cyrillic) secret names in validator
CI / test (push) Has been cancelled
CI / docker (push) Has been cancelled

This commit is contained in:
Hermes committed 2026-08-02 14:17:11 +02:00
1 parent 07272804e4
commit 0ae4416b0b
1 file changed
+3 -2
+3 -2
View File
@@ -8,7 +8,7 @@ import (
const SecretNameMaxLength = 255
var SecretNamePattern = regexp.MustCompile(`^[a-zA-Z0-9]([a-zA-Z0-9 _\-\./]*[a-zA-Z0-9])?$`)
var SecretNamePattern = regexp.MustCompile(`^[\p{L}0-9]([\p{L}0-9 _\-\\./]*[\p{L}0-9])?$`)
func IsValidSecretName(name string) bool {
if len(name) == 0 || len(name) > SecretNameMaxLength {
@@ -19,8 +19,9 @@ func IsValidSecretName(name string) bool {
return false
}
// Allow UTF-8 (incl. Cyrillic) secret names; only reject control chars.
for _, ch := range name {
if ch < 32 || ch > 126 {
if ch < 32 || ch == 127 {
return false
}
}