commit
984b1567b5
|
|
@ -13,18 +13,23 @@ import (
|
||||||
|
|
||||||
func TestWillingToIssue(t *testing.T) {
|
func TestWillingToIssue(t *testing.T) {
|
||||||
shouldBeSyntaxError := []string{
|
shouldBeSyntaxError := []string{
|
||||||
``, // Empty name
|
``, // Empty name
|
||||||
`zomb!.com`, // ASCII character out of range
|
`zomb!.com`, // ASCII character out of range
|
||||||
`zömbo.com`, // non-ASCII character
|
`emailaddress@myseriously.present.com`,
|
||||||
`127.0.0.1`, // IPv4 address
|
`user:pass@myseriously.present.com`,
|
||||||
`fe80::1:1`, // IPv6 address
|
`zömbo.com`, // non-ASCII character
|
||||||
`a.b.c.d.e.f.g.h.i.j.k`, // Too many labels (>10)
|
`127.0.0.1`, // IPv4 address
|
||||||
|
`fe80::1:1`, // IPv6 addresses
|
||||||
|
`[2001:db8:85a3:8d3:1319:8a2e:370:7348]`, // unexpected IPv6 variants
|
||||||
|
`[2001:db8:85a3:8d3:1319:8a2e:370:7348]:443`,
|
||||||
|
`2001:db8::/32`,
|
||||||
|
`a.b.c.d.e.f.g.h.i.j.k`, // Too many labels (>10)
|
||||||
|
|
||||||
`www.0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef.com`, // Too long (>255 characters)
|
`www.0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef.com`, // Too long (>255 characters)
|
||||||
|
|
||||||
`www.abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz.com`, // Label too long (>63 characters)
|
`www.abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz.com`, // Label too long (>63 characters)
|
||||||
|
|
||||||
`www.-ombo.com`, // Label starts with '-'
|
`www.-ombo.com`, // Label starts with '-'
|
||||||
`www.xn--hmr.net`, // Punycode (disallowed for now)
|
`www.xn--hmr.net`, // Punycode (disallowed for now)
|
||||||
`xn--.net`, // No punycode for now.
|
`xn--.net`, // No punycode for now.
|
||||||
`0`,
|
`0`,
|
||||||
|
|
@ -58,11 +63,14 @@ func TestWillingToIssue(t *testing.T) {
|
||||||
`co.uk`,
|
`co.uk`,
|
||||||
`example.acting`,
|
`example.acting`,
|
||||||
`example.internal`,
|
`example.internal`,
|
||||||
|
`localhost`,
|
||||||
|
`mail`,
|
||||||
// All-numeric final label not okay.
|
// All-numeric final label not okay.
|
||||||
`www.zombo.163`,
|
`www.zombo.163`,
|
||||||
}
|
}
|
||||||
|
|
||||||
shouldBeBlacklisted := []string{
|
shouldBeBlacklisted := []string{
|
||||||
|
`addons.mozilla.org`,
|
||||||
`ebay.co.uk`,
|
`ebay.co.uk`,
|
||||||
`www.google.com`,
|
`www.google.com`,
|
||||||
`lots.of.labels.pornhub.com`,
|
`lots.of.labels.pornhub.com`,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue