Skip to content

Commit 63f6562

Browse files
author
OpenShift Bot
committed
Merge pull request #9180 from liggitt/scope-validation
Merged by openshift-bot
2 parents 9789e45 + 7641899 commit 63f6562

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pkg/oauth/api/validation/validation.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -227,9 +227,9 @@ func ValidateScopes(scopes []string, fldPath *field.Path) field.ErrorList {
227227
// for those without an ascii table, that's `!`, `#-[`, `]-~` inclusive.
228228
for _, ch := range scope {
229229
switch {
230-
case ch == rune("!"[0]):
231-
case ch >= rune("#"[0]) && ch <= rune("]"[0]):
232-
case ch >= rune("]"[0]) && ch <= rune("~"[0]):
230+
case ch == '!':
231+
case ch >= '#' && ch <= '[':
232+
case ch >= ']' && ch <= '~':
233233
default:
234234
allErrs = append(allErrs, field.Invalid(fldPath.Index(i), scope, fmt.Sprintf("%v not allowed", ch)))
235235
illegalCharacter = true

0 commit comments

Comments
 (0)