diff --git a/internal/httpd/httpd_test.go b/internal/httpd/httpd_test.go index bf7d8bcc3..b36ba05bf 100644 --- a/internal/httpd/httpd_test.go +++ b/internal/httpd/httpd_test.go @@ -27636,6 +27636,13 @@ func TestIsNameValid(t *testing.T) { {"slash", "user/name", false}, {"backslash", "user\\name", false}, {"colon", "user:name", false}, + {"pipe auth0 style", "auth0|abc123", true}, + {"pipe google-oauth2 style", "google-oauth2|xyz", true}, + {"asterisk", "user*name", false}, + {"question", "user?name", false}, + {"quote", "user\"name", false}, + {"less than", "username", false}, {"single dot", ".", false}, {"double dot", "..", false}, {"dot with suffix allowed", ".hidden", true}, diff --git a/internal/util/util.go b/internal/util/util.go index 7a5acb809..5b6e3d0d6 100644 --- a/internal/util/util.go +++ b/internal/util/util.go @@ -206,7 +206,7 @@ func IsNameValid(name string) bool { switch r { case '/', '\\': return false - case ':', '*', '?', '"', '<', '>', '|': + case ':', '*', '?', '"', '<', '>': return false } }