relax subdomain validation from UUID to actual subdomain (#243)

This commit is contained in:
Jonathan Vanasco
2021-01-11 07:55:31 -05:00
committed by GitHub
parent d573f771a8
commit 9c6ca258e1
2 changed files with 9 additions and 6 deletions

View File

@ -55,7 +55,9 @@ func TestGetValidSubdomain(t *testing.T) {
output bool
}{
{"a097455b-52cc-4569-90c8-7a4b97c6eba8", true},
{"a-97455b-52cc-4569-90c8-7a4b97c6eba8", false},
{"a-97455b-52cc-4569-90c8-7a4b97c6eba8", true},
{"foo.example.com", false},
{"foo-example-com", true},
{"", false},
{"&!#!25123!%!'%", false},
} {