|
3896 | 3896 | "search": "",
|
3897 | 3897 | "hash": ""
|
3898 | 3898 | },
|
3899 |
| - { |
3900 |
| - "input": "http://0..0x300/", |
3901 |
| - "base": "about:blank", |
3902 |
| - "href": "http://0..0x300/", |
3903 |
| - "origin": "http://0..0x300", |
3904 |
| - "protocol": "http:", |
3905 |
| - "username": "", |
3906 |
| - "password": "", |
3907 |
| - "host": "0..0x300", |
3908 |
| - "hostname": "0..0x300", |
3909 |
| - "port": "", |
3910 |
| - "pathname": "/", |
3911 |
| - "search": "", |
3912 |
| - "hash": "" |
3913 |
| - }, |
3914 | 3899 | "Broken IPv6",
|
3915 | 3900 | {
|
3916 | 3901 | "input": "http://[www.google.com]/",
|
|
5161 | 5146 | "hash": "#foo%60bar"
|
5162 | 5147 | },
|
5163 | 5148 | "# IPv4 parsing (via https://github.com/nodejs/node/pull/10317)",
|
| 5149 | + { |
| 5150 | + "input": "http://1.2.3.4/", |
| 5151 | + "base": "http://other.com/", |
| 5152 | + "href": "http://1.2.3.4/", |
| 5153 | + "origin": "http://1.2.3.4", |
| 5154 | + "protocol": "http:", |
| 5155 | + "username": "", |
| 5156 | + "password": "", |
| 5157 | + "host": "1.2.3.4", |
| 5158 | + "hostname": "1.2.3.4", |
| 5159 | + "port": "", |
| 5160 | + "pathname": "/", |
| 5161 | + "search": "", |
| 5162 | + "hash": "" |
| 5163 | + }, |
| 5164 | + { |
| 5165 | + "input": "http://1.2.3.4./", |
| 5166 | + "base": "http://other.com/", |
| 5167 | + "href": "http://1.2.3.4/", |
| 5168 | + "origin": "http://1.2.3.4", |
| 5169 | + "protocol": "http:", |
| 5170 | + "username": "", |
| 5171 | + "password": "", |
| 5172 | + "host": "1.2.3.4", |
| 5173 | + "hostname": "1.2.3.4", |
| 5174 | + "port": "", |
| 5175 | + "pathname": "/", |
| 5176 | + "search": "", |
| 5177 | + "hash": "" |
| 5178 | + }, |
5164 | 5179 | {
|
5165 | 5180 | "input": "http://192.168.257",
|
5166 | 5181 | "base": "http://other.com/",
|
|
5176 | 5191 | "search": "",
|
5177 | 5192 | "hash": ""
|
5178 | 5193 | },
|
| 5194 | + { |
| 5195 | + "input": "http://192.168.257.", |
| 5196 | + "base": "http://other.com/", |
| 5197 | + "href": "http://192.168.1.1/", |
| 5198 | + "origin": "http://192.168.1.1", |
| 5199 | + "protocol": "http:", |
| 5200 | + "username": "", |
| 5201 | + "password": "", |
| 5202 | + "host": "192.168.1.1", |
| 5203 | + "hostname": "192.168.1.1", |
| 5204 | + "port": "", |
| 5205 | + "pathname": "/", |
| 5206 | + "search": "", |
| 5207 | + "hash": "" |
| 5208 | + }, |
5179 | 5209 | {
|
5180 | 5210 | "input": "http://192.168.257.com",
|
5181 | 5211 | "base": "http://other.com/",
|
|
5236 | 5266 | "search": "",
|
5237 | 5267 | "hash": ""
|
5238 | 5268 | },
|
| 5269 | + { |
| 5270 | + "input": "http://999999999.", |
| 5271 | + "base": "http://other.com/", |
| 5272 | + "href": "http://59.154.201.255/", |
| 5273 | + "origin": "http://59.154.201.255", |
| 5274 | + "protocol": "http:", |
| 5275 | + "username": "", |
| 5276 | + "password": "", |
| 5277 | + "host": "59.154.201.255", |
| 5278 | + "hostname": "59.154.201.255", |
| 5279 | + "port": "", |
| 5280 | + "pathname": "/", |
| 5281 | + "search": "", |
| 5282 | + "hash": "" |
| 5283 | + }, |
5239 | 5284 | {
|
5240 | 5285 | "input": "http://999999999.com",
|
5241 | 5286 | "base": "http://other.com/",
|
|
5316 | 5361 | "base": "http://other.com/",
|
5317 | 5362 | "failure": true
|
5318 | 5363 | },
|
5319 |
| - { |
5320 |
| - "input": "http://256.256.256.256.256", |
5321 |
| - "base": "http://other.com/", |
5322 |
| - "href": "http://256.256.256.256.256/", |
5323 |
| - "origin": "http://256.256.256.256.256", |
5324 |
| - "protocol": "http:", |
5325 |
| - "username": "", |
5326 |
| - "password": "", |
5327 |
| - "host": "256.256.256.256.256", |
5328 |
| - "hostname": "256.256.256.256.256", |
5329 |
| - "port": "", |
5330 |
| - "pathname": "/", |
5331 |
| - "search": "", |
5332 |
| - "hash": "" |
5333 |
| - }, |
5334 | 5364 | {
|
5335 | 5365 | "input": "https://0x.0x.0",
|
5336 | 5366 | "base": "about:blank",
|
|
7298 | 7328 | "hash": ""
|
7299 | 7329 | },
|
7300 | 7330 | "Invalid IPv4 radix digits",
|
7301 |
| - { |
7302 |
| - "input": "http://0177.0.0.0189", |
7303 |
| - "base": "about:blank", |
7304 |
| - "href": "http://0177.0.0.0189/", |
7305 |
| - "protocol": "http:", |
7306 |
| - "username": "", |
7307 |
| - "password": "", |
7308 |
| - "host": "0177.0.0.0189", |
7309 |
| - "hostname": "0177.0.0.0189", |
7310 |
| - "port": "", |
7311 |
| - "pathname": "/", |
7312 |
| - "search": "", |
7313 |
| - "hash": "" |
7314 |
| - }, |
7315 | 7331 | {
|
7316 | 7332 | "input": "http://0x7f.0.0.0x7g",
|
7317 | 7333 | "base": "about:blank",
|
|
8031 | 8047 | "input": "?",
|
8032 | 8048 | "base": null,
|
8033 | 8049 | "failure": true
|
| 8050 | + }, |
| 8051 | + "Last component looks like a number, but not valid IPv4", |
| 8052 | + { |
| 8053 | + "input": "http://1.2.3.4.5", |
| 8054 | + "base": "http://other.com/", |
| 8055 | + "failure": true |
| 8056 | + }, |
| 8057 | + { |
| 8058 | + "input": "http://1.2.3.4.5.", |
| 8059 | + "base": "http://other.com/", |
| 8060 | + "failure": true |
| 8061 | + }, |
| 8062 | + { |
| 8063 | + "input": "http://0..0x300/", |
| 8064 | + "base": "about:blank", |
| 8065 | + "failure": true |
| 8066 | + }, |
| 8067 | + { |
| 8068 | + "input": "http://0..0x300./", |
| 8069 | + "base": "about:blank", |
| 8070 | + "failure": true |
| 8071 | + }, |
| 8072 | + { |
| 8073 | + "input": "http://256.256.256.256.256", |
| 8074 | + "base": "http://other.com/", |
| 8075 | + "failure": true |
| 8076 | + }, |
| 8077 | + { |
| 8078 | + "input": "http://256.256.256.256.256.", |
| 8079 | + "base": "http://other.com/", |
| 8080 | + "failure": true |
| 8081 | + }, |
| 8082 | + { |
| 8083 | + "input": "http://1.2.3.08", |
| 8084 | + "base": "about:blank", |
| 8085 | + "failure": true |
| 8086 | + }, |
| 8087 | + { |
| 8088 | + "input": "http://1.2.3.08.", |
| 8089 | + "base": "about:blank", |
| 8090 | + "failure": true |
| 8091 | + }, |
| 8092 | + { |
| 8093 | + "input": "http://1.2.3.09", |
| 8094 | + "base": "about:blank", |
| 8095 | + "failure": true |
| 8096 | + }, |
| 8097 | + { |
| 8098 | + "input": "http://09.2.3.4", |
| 8099 | + "base": "about:blank", |
| 8100 | + "failure": true |
| 8101 | + }, |
| 8102 | + { |
| 8103 | + "input": "http://09.2.3.4.", |
| 8104 | + "base": "about:blank", |
| 8105 | + "failure": true |
| 8106 | + }, |
| 8107 | + { |
| 8108 | + "input": "http://01.2.3.4.5", |
| 8109 | + "base": "about:blank", |
| 8110 | + "failure": true |
| 8111 | + }, |
| 8112 | + { |
| 8113 | + "input": "http://01.2.3.4.5.", |
| 8114 | + "base": "about:blank", |
| 8115 | + "failure": true |
| 8116 | + }, |
| 8117 | + { |
| 8118 | + "input": "http://0x100.2.3.4", |
| 8119 | + "base": "about:blank", |
| 8120 | + "failure": true |
| 8121 | + }, |
| 8122 | + { |
| 8123 | + "input": "http://0x100.2.3.4.", |
| 8124 | + "base": "about:blank", |
| 8125 | + "failure": true |
| 8126 | + }, |
| 8127 | + { |
| 8128 | + "input": "http://0x1.2.3.4.5", |
| 8129 | + "base": "about:blank", |
| 8130 | + "failure": true |
| 8131 | + }, |
| 8132 | + { |
| 8133 | + "input": "http://0x1.2.3.4.5.", |
| 8134 | + "base": "about:blank", |
| 8135 | + "failure": true |
| 8136 | + }, |
| 8137 | + { |
| 8138 | + "input": "http://foo.1.2.3.4", |
| 8139 | + "base": "about:blank", |
| 8140 | + "failure": true |
| 8141 | + }, |
| 8142 | + { |
| 8143 | + "input": "http://foo.1.2.3.4.", |
| 8144 | + "base": "about:blank", |
| 8145 | + "failure": true |
| 8146 | + }, |
| 8147 | + { |
| 8148 | + "input": "http://foo.2.3.4", |
| 8149 | + "base": "about:blank", |
| 8150 | + "failure": true |
| 8151 | + }, |
| 8152 | + { |
| 8153 | + "input": "http://foo.2.3.4.", |
| 8154 | + "base": "about:blank", |
| 8155 | + "failure": true |
| 8156 | + }, |
| 8157 | + { |
| 8158 | + "input": "http://foo.09", |
| 8159 | + "base": "about:blank", |
| 8160 | + "failure": true |
| 8161 | + }, |
| 8162 | + { |
| 8163 | + "input": "http://foo.09.", |
| 8164 | + "base": "about:blank", |
| 8165 | + "failure": true |
| 8166 | + }, |
| 8167 | + { |
| 8168 | + "input": "http://foo.0x4", |
| 8169 | + "base": "about:blank", |
| 8170 | + "failure": true |
| 8171 | + }, |
| 8172 | + { |
| 8173 | + "input": "http://foo.0x4.", |
| 8174 | + "base": "about:blank", |
| 8175 | + "failure": true |
8034 | 8176 | }
|
8035 | 8177 | ]
|
0 commit comments