fix(hermes): repair sonar/pegasus/go:S3776/AZ4V2tkdqCRMjDT4bXBr #2

Open
bstein wants to merge 1 commits from hermes-repair/sonar-AZ4V2tkdqCRMjDT4bXBr into main
Showing only changes of commit 45051b43ee - Show all commits

View File

@ -28,7 +28,7 @@ func sanitizeDescriptor(s string) string {
var b []rune
lastUnderscore := false
for _, r := range s {
ok := (r >= 'a' && r <= 'z') || (r >= 'A' && r <= 'Z') || (r >= '0' && r <= '9') || r == '_' || r == '-'
ok := strings.ContainsRune("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-", r)
if !ok {
r = '_'
}