You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// assert.same(String(new URL('http://257.168.0xF0')), 'http://257.168.0xf0/', 'incorrect IPv4 parsed as host'); // TypeError in Chrome and Safari
assert.same(String(newURL('http://0300.168.0xG0')),'http://0300.168.0xg0/','incorrect IPv4 parsed as host');
43
44
45
+
assert.throws(()=>newURL('http://1.2.3.4.5/'),'IPv4 with > 4 parts');
46
+
assert.throws(()=>newURL('http://a.b.c.d.5/'),'host ending in number with non-numeric parts');
47
+
assert.throws(()=>newURL('http://foo.1/'),'host ending in number with non-IPv4');
// assert.same(String(new URL('http://257.168.0xF0')), 'http://257.168.0xf0/', 'incorrect IPv4 parsed as host'); // TypeError in Chrome and Safari
assert.same(String(newURL('http://0300.168.0xG0')),'http://0300.168.0xg0/','incorrect IPv4 parsed as host');
44
45
46
+
assert.throws(()=>newURL('http://1.2.3.4.5/'),'IPv4 with > 4 parts');
47
+
assert.throws(()=>newURL('http://a.b.c.d.5/'),'host ending in number with non-numeric parts');
48
+
assert.throws(()=>newURL('http://foo.1/'),'host ending in number with non-IPv4');
0 commit comments