Skip to content

Commit 549082a

Browse files
authored
fix: remove requirement that cred aliases be alphanumeric (#580)
Signed-off-by: Grant Linville <[email protected]>
1 parent 51fd2b3 commit 549082a

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

pkg/types/tool.go

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import (
55
"encoding/json"
66
"fmt"
77
"path/filepath"
8-
"regexp"
98
"slices"
109
"sort"
1110
"strings"
@@ -284,10 +283,6 @@ func ParseCredentialArgs(toolName string, input string) (string, string, map[str
284283
fields = fields[2:]
285284
}
286285

287-
if alias != "" && !isAlphaNumeric(alias) {
288-
return "", "", nil, fmt.Errorf("credential alias must be alphanumeric")
289-
}
290-
291286
if len(fields) == 0 { // Nothing left, so just return
292287
return originalName, alias, nil, nil
293288
}
@@ -785,7 +780,3 @@ func FirstSet[T comparable](in ...T) (result T) {
785780
}
786781
return
787782
}
788-
789-
func isAlphaNumeric(s string) bool {
790-
return regexp.MustCompile(`^[a-zA-Z0-9_.]+$`).MatchString(s)
791-
}

0 commit comments

Comments
 (0)