Skip to content

Commit 9c57754

Browse files
committed
Annotations: Allow at symbol in URLs
Signed-off-by: Alexander Gil <[email protected]>
1 parent c8ab89c commit 9c57754

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

internal/ingress/annotations/parser/validators.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ var (
4444
alphaNumericChars = `\-\.\_\~a-zA-Z0-9\/:`
4545
extendedAlphaNumeric = alphaNumericChars + ", "
4646
regexEnabledChars = regexp.QuoteMeta(`^$[](){}*+?|&=\`)
47-
urlEnabledChars = regexp.QuoteMeta(`,:?&=`)
47+
urlEnabledChars = regexp.QuoteMeta(`@,:?&=`)
4848
)
4949

5050
// IsValidRegex checks if the tested string can be used as a regex, but without any weird character.

internal/ingress/annotations/parser/validators_test.go

+5
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,11 @@ func TestValidateArrayOfServerName(t *testing.T) {
6060
value: "https://oauth.example/oauth2/auth?allowed_groups=gid1,gid2",
6161
wantErr: false,
6262
},
63+
{
64+
name: "should allow comma separated query params",
65+
value: "https://oauth.example/oauth2/[email protected],[email protected]",
66+
wantErr: false,
67+
},
6368
{
6469
name: "should deny names with weird characters",
6570
value: "something.com,lolo;xpto.com,nothing.com",

0 commit comments

Comments
 (0)