Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions pkg/types/tool.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (
"encoding/json"
"fmt"
"path/filepath"
"regexp"
"slices"
"sort"
"strings"
Expand Down Expand Up @@ -284,10 +283,6 @@ func ParseCredentialArgs(toolName string, input string) (string, string, map[str
fields = fields[2:]
}

if alias != "" && !isAlphaNumeric(alias) {
return "", "", nil, fmt.Errorf("credential alias must be alphanumeric")
}

if len(fields) == 0 { // Nothing left, so just return
return originalName, alias, nil, nil
}
Expand Down Expand Up @@ -785,7 +780,3 @@ func FirstSet[T comparable](in ...T) (result T) {
}
return
}

func isAlphaNumeric(s string) bool {
return regexp.MustCompile(`^[a-zA-Z0-9_.]+$`).MatchString(s)
}