Skip to content

Commit

Permalink
URL: forbid <, >, and ^ in hosts
Browse files Browse the repository at this point in the history
See whatwg/url#459 for context
  • Loading branch information
rmisev committed May 13, 2020
1 parent 4602027 commit b4e59c1
Showing 1 changed file with 51 additions and 4 deletions.
55 changes: 51 additions & 4 deletions url/resources/urltestdata.json
Original file line number Diff line number Diff line change
Expand Up @@ -4482,15 +4482,15 @@
"hash": ""
},
{
"input": "sc://\u001F!\"$&'()*+,-.;<=>^_`{|}~/",
"input": "sc://\u001F!\"$&'()*+,-.;=_`{|}~/",
"base": "about:blank",
"href": "sc://%1F!\"$&'()*+,-.;<=>^_`{|}~/",
"href": "sc://%1F!\"$&'()*+,-.;=_`{|}~/",
"origin": "null",
"protocol": "sc:",
"username": "",
"password": "",
"host": "%1F!\"$&'()*+,-.;<=>^_`{|}~",
"hostname": "%1F!\"$&'()*+,-.;<=>^_`{|}~",
"host": "%1F!\"$&'()*+,-.;=_`{|}~",
"hostname": "%1F!\"$&'()*+,-.;=_`{|}~",
"port": "",
"pathname": "/",
"search": "",
Expand Down Expand Up @@ -4649,6 +4649,53 @@
"search": "",
"hash": ""
},
"Forbidden host code points",
{
"input": "http://a<b",
"base": "about:blank",
"failure": true
},
{
"input": "http://a>b",
"base": "about:blank",
"failure": true
},
{
"input": "http://a^b",
"base": "about:blank",
"failure": true
},
{
"input": "non-special://a<b",
"base": "about:blank",
"failure": true
},
{
"input": "non-special://a>b",
"base": "about:blank",
"failure": true
},
{
"input": "non-special://a^b",
"base": "about:blank",
"failure": true
},
"Allowed host code points",
{
"input": "http://\u001F!\"$&'()*+,-.;=_`{|}~/",
"base": "about:blank",
"href": "http://\u001F!\"$&'()*+,-.;=_`{|}~/",
"origin": "http://\u001F!\"$&'()*+,-.;=_`{|}~",
"protocol": "http:",
"username": "",
"password": "",
"host": "\u001F!\"$&'()*+,-.;=_`{|}~",
"hostname": "\u001F!\"$&'()*+,-.;=_`{|}~",
"port": "",
"pathname": "/",
"search": "",
"hash": ""
},
"# Hosts and percent-encoding",
{
"input": "ftp://example.com%80/",
Expand Down

0 comments on commit b4e59c1

Please sign in to comment.