Changeset 271899 in webkit
- Timestamp:
- Jan 26, 2021 1:14:33 PM (18 months ago)
- Location:
- trunk
- Files:
-
- 14 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/fast/url/file-http-base-expected.txt (modified) (1 diff)
-
LayoutTests/fast/url/file-http-base.html (modified) (3 diffs)
-
LayoutTests/imported/w3c/ChangeLog (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/url/a-element-expected.txt (modified) (2 diffs)
-
LayoutTests/imported/w3c/web-platform-tests/url/a-element-origin-expected.txt (modified) (2 diffs)
-
LayoutTests/imported/w3c/web-platform-tests/url/a-element-origin-xhtml-expected.txt (modified) (2 diffs)
-
LayoutTests/imported/w3c/web-platform-tests/url/a-element-xhtml-expected.txt (modified) (2 diffs)
-
LayoutTests/imported/w3c/web-platform-tests/url/failure-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/url/resources/urltestdata.json (modified) (2 diffs)
-
LayoutTests/imported/w3c/web-platform-tests/url/url-constructor-expected.txt (modified) (2 diffs)
-
LayoutTests/imported/w3c/web-platform-tests/url/url-origin-expected.txt (modified) (2 diffs)
-
Source/WTF/ChangeLog (modified) (1 diff)
-
Source/WTF/wtf/URLParser.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r271893 r271899 1 2021-01-26 Alex Christensen <achristensen@webkit.org> 2 3 Forbid '|' in URL hosts 4 https://bugs.webkit.org/show_bug.cgi?id=220778 5 6 Reviewed by Youenn Fablet. 7 8 * fast/url/file-http-base-expected.txt: 9 * fast/url/file-http-base.html: 10 1 11 2021-01-26 Rob Buis <rbuis@igalia.com> 2 12 -
trunk/LayoutTests/fast/url/file-http-base-expected.txt
r212953 r271899 4 4 5 5 6 FAIL canonicalize('file:c:\\foo\\bar.html') should be file:///C:/foo/bar.html. Was file:///c:/foo/bar.html. 7 FAIL canonicalize(' File:c|////foo\\bar.html') should be file:///C:////foo/bar.html. Was file:///c:////foo/bar.html. 6 PASS canonicalize('file:c:\\foo\\bar.html') is 'file:///c:/foo/bar.html' 7 PASS canonicalize(' File:c|////foo\\bar.html') is 'file:///c:////foo/bar.html' 8 8 PASS canonicalize('file:') is 'file:///' 9 FAIL canonicalize('file:UNChost/path') should be file://unchost/path. Was file:///UNChost/path. 10 FAIL canonicalize('c:\\foo\\bar') should be file:///C:/foo/bar. Was c:\foo\bar. 11 FAIL canonicalize('C|/foo/bar') should be file:///C:/foo/bar. Was http://example.com/mock/C|/foo/bar. 12 FAIL canonicalize('/C|\\foo\\bar') should be file:///C:/foo/bar. Was http://example.com/C|/foo/bar. 13 FAIL canonicalize('//C|/foo/bar') should be file:///C:/foo/bar. Was http://c|/foo/bar. 14 FAIL canonicalize('//server/file') should be file://server/file. Was http://server/file. 15 FAIL canonicalize('\\\\server\\file') should be file://server/file. Was http://server/file. 16 FAIL canonicalize('/\\server/file') should be file://server/file. Was http://server/file. 17 FAIL canonicalize('file:c:foo/bar.html') should be file:///C:/foo/bar.html. Was file:///c:foo/bar.html. 18 FAIL canonicalize('file:/\\/\\C:\\\\//foo\\bar.html') should be file:///C:////foo/bar.html. Was file:////C:////foo/bar.html. 9 PASS canonicalize('file:UNChost/path') is 'file:///UNChost/path' 10 PASS canonicalize('c:\\foo\\bar') is 'c:\\foo\\bar' 11 PASS canonicalize('C|/foo/bar') is 'http://example.com/mock/C|/foo/bar' 12 PASS canonicalize('/C|\\foo\\bar') is 'http://example.com/C|/foo/bar' 13 PASS canonicalize('//C|/foo/bar') is '//C|/foo/bar' 14 PASS canonicalize('//server/file') is 'http://server/file' 15 PASS canonicalize('\\\\server\\file') is 'http://server/file' 16 PASS canonicalize('/\\server/file') is 'http://server/file' 17 PASS canonicalize('file:c:foo/bar.html') is 'file:///c:foo/bar.html' 18 PASS canonicalize('file:/\\/\\C:\\\\//foo\\bar.html') is 'file:////C:////foo/bar.html' 19 19 PASS canonicalize('file:///foo/bar.txt') is 'file:///foo/bar.txt' 20 FAIL canonicalize('FILE:/\\/\\7:\\\\//foo\\bar.html') should be file://7:////foo/bar.html. Was file:////7:////foo/bar.html. 21 FAIL canonicalize('file:filer/home\\me') should be file://filer/home/me. Was file:///filer/home/me. 20 PASS canonicalize('FILE:/\\/\\7:\\\\//foo\\bar.html') is 'file:////7:////foo/bar.html' 21 PASS canonicalize('file:filer/home\\me') is 'file:///filer/home/me' 22 22 PASS canonicalize('file:///C:/foo/../../../bar.html') is 'file:///C:/bar.html' 23 FAIL canonicalize('file:///C:/asdf#\xc2') should be file:///C:/asdf#Â. Was file:///C:/asdf#%C3%82. 24 FAIL canonicalize('file:///C:/asdf#Â') should be file:///C:/asdf#Â. Was file:///C:/asdf#%C3%82. 23 PASS canonicalize('file:///C:/asdf#\xc2') is 'file:///C:/asdf#%C3%82' 24 PASS canonicalize('file:///C:/asdf#Â') is 'file:///C:/asdf#%C3%82' 25 25 PASS canonicalize('file:///home/me') is 'file:///home/me' 26 26 PASS canonicalize('file:c:\\foo\\bar.html') is 'file:///c:/foo/bar.html' 27 FAIL canonicalize('file:c|//foo\\bar.html') should be file:///c%7C//foo/bar.html. Was file:///c://foo/bar.html. 28 FAIL canonicalize('//') should be file:///. Was //. 29 FAIL canonicalize('///') should be file:///. Was ///. 30 FAIL canonicalize('///test') should be file:///test. Was http://test/. 27 PASS canonicalize('file:c|//foo\\bar.html') is 'file:///c://foo/bar.html' 28 PASS canonicalize('//') is '//' 29 PASS canonicalize('///') is '///' 30 PASS canonicalize('///test') is 'http://test/' 31 31 PASS canonicalize('file://test') is 'file://test/' 32 FAIL canonicalize('file://localhost') should be file://localhost/. Was file:///. 33 FAIL canonicalize('file://localhost/') should be file://localhost/. Was file:///. 34 FAIL canonicalize('file://localhost/test') should be file://localhost/test. Was file:///test. 32 PASS canonicalize('file://localhost') is 'file:///' 33 PASS canonicalize('file://localhost/') is 'file:///' 34 PASS canonicalize('file://localhost/test') is 'file:///test' 35 35 PASS successfullyParsed is true 36 36 -
trunk/LayoutTests/fast/url/file-http-base.html
r174160 r271899 12 12 cases = [ 13 13 // Windows-style paths 14 ["file:c:\\\\foo\\\\bar.html", "file:/// C:/foo/bar.html"],15 [" File:c|////foo\\\\bar.html", "file:/// C:////foo/bar.html"],14 ["file:c:\\\\foo\\\\bar.html", "file:///c:/foo/bar.html"], 15 [" File:c|////foo\\\\bar.html", "file:///c:////foo/bar.html"], 16 16 ["file:", "file:///"], 17 ["file:UNChost/path", "file:// unchost/path"],17 ["file:UNChost/path", "file:///UNChost/path"], 18 18 // CanonicalizeFileURL supports absolute Windows style paths for IE 19 19 // compatability. Note that the caller must decide that this is a file 20 20 // URL itself so it can call the file canonicalizer. This is usually 21 21 // done automatically as part of relative URL resolving. 22 ["c:\\\\foo\\\\bar", " file:///C:/foo/bar"],23 ["C|/foo/bar", " file:///C:/foo/bar"],24 ["/C|\\\\foo\\\\bar", " file:///C:/foo/bar"],25 ["//C|/foo/bar", " file:///C:/foo/bar"],26 ["//server/file", " file://server/file"],27 ["\\\\\\\\server\\\\file", " file://server/file"],28 ["/\\\\server/file", " file://server/file"],22 ["c:\\\\foo\\\\bar", "c:\\\\foo\\\\bar"], 23 ["C|/foo/bar", "http://example.com/mock/C|/foo/bar"], 24 ["/C|\\\\foo\\\\bar", "http://example.com/C|/foo/bar"], 25 ["//C|/foo/bar", "//C|/foo/bar"], 26 ["//server/file", "http://server/file"], 27 ["\\\\\\\\server\\\\file", "http://server/file"], 28 ["/\\\\server/file", "http://server/file"], 29 29 // We should preserve the number of slashes after the colon for IE 30 30 // compatability, except when there is none, in which case we should 31 31 // add one. 32 ["file:c:foo/bar.html", "file:/// C:/foo/bar.html"],33 ["file:/\\\\/\\\\C:\\\\\\\\//foo\\\\bar.html", "file:/// C:////foo/bar.html"],32 ["file:c:foo/bar.html", "file:///c:foo/bar.html"], 33 ["file:/\\\\/\\\\C:\\\\\\\\//foo\\\\bar.html", "file:////C:////foo/bar.html"], 34 34 // Three slashes should be non-UNC, even if there is no drive spec (IE 35 35 // does this, which makes the resulting request invalid). … … 41 41 // seem to be a strong argument for why allowing it here would be bad, so 42 42 // we just tolerate it and the load will fail later. 43 ["FILE:/\\\\/\\\\7:\\\\\\\\//foo\\\\bar.html", "file:// 7:////foo/bar.html"],44 ["file:filer/home\\\\me", "file:// filer/home/me"],43 ["FILE:/\\\\/\\\\7:\\\\\\\\//foo\\\\bar.html", "file:////7:////foo/bar.html"], 44 ["file:filer/home\\\\me", "file:///filer/home/me"], 45 45 // Make sure relative paths can't go above the "C:" 46 46 ["file:///C:/foo/../../../bar.html", "file:///C:/bar.html"], 47 47 // Busted refs shouldn't make the whole thing fail. 48 ["file:///C:/asdf#\\xc2", "file:///C:/asdf# \\xc2"],49 ["file:///C:/asdf#\xc2", "file:///C:/asdf# \xc2"],48 ["file:///C:/asdf#\\xc2", "file:///C:/asdf#%C3%82"], 49 ["file:///C:/asdf#\xc2", "file:///C:/asdf#%C3%82"], 50 50 51 51 // Unix-style paths … … 53 53 // Windowsy ones should get still treated as Unix-style. 54 54 ["file:c:\\\\foo\\\\bar.html", "file:///c:/foo/bar.html"], 55 ["file:c|//foo\\\\bar.html", "file:///c %7C//foo/bar.html"],55 ["file:c|//foo\\\\bar.html", "file:///c://foo/bar.html"], 56 56 // file: tests from WebKit (LayoutTests/fast/loader/url-parse-1.html) 57 ["//", " file:///"],58 ["///", " file:///"],59 ["///test", " file:///test"],57 ["//", "//"], 58 ["///", "///"], 59 ["///test", "http://test/"], 60 60 ["file://test", "file://test/"], 61 ["file://localhost", "file:// localhost/"],62 ["file://localhost/", "file:// localhost/"],63 ["file://localhost/test", "file:// localhost/test"],61 ["file://localhost", "file:///"], 62 ["file://localhost/", "file:///"], 63 ["file://localhost/test", "file:///test"], 64 64 ]; 65 65 -
trunk/LayoutTests/imported/w3c/ChangeLog
r271893 r271899 1 2021-01-26 Alex Christensen <achristensen@webkit.org> 2 3 Forbid '|' in URL hosts 4 https://bugs.webkit.org/show_bug.cgi?id=220778 5 6 Reviewed by Youenn Fablet. 7 8 * web-platform-tests/url/a-element-expected.txt: 9 * web-platform-tests/url/a-element-origin-expected.txt: 10 * web-platform-tests/url/a-element-origin-xhtml-expected.txt: 11 * web-platform-tests/url/a-element-xhtml-expected.txt: 12 * web-platform-tests/url/failure-expected.txt: 13 * web-platform-tests/url/resources/urltestdata.json: 14 * web-platform-tests/url/url-constructor-expected.txt: 15 * web-platform-tests/url/url-origin-expected.txt: 16 1 17 2021-01-26 Rob Buis <rbuis@igalia.com> 2 18 -
trunk/LayoutTests/imported/w3c/web-platform-tests/url/a-element-expected.txt
r268853 r271899 368 368 PASS Parsing: <non-special://a>b> against <about:blank> 369 369 PASS Parsing: <non-special://a^b> against <about:blank> 370 PASS Parsing: <http://!"$&'()*+,-.;=_`{ |}~/> against <about:blank>371 PASS Parsing: <sc://!"$&'()*+,-.;=_`{ |}~/> against <about:blank>370 PASS Parsing: <http://!"$&'()*+,-.;=_`{}~/> against <about:blank> 371 PASS Parsing: <sc://!"$&'()*+,-.;=_`{}~/> against <about:blank> 372 372 PASS Parsing: <ftp://example.com%80/> against <about:blank> 373 373 PASS Parsing: <ftp://example.com%A0/> against <about:blank> … … 415 415 PASS Parsing: <file:///C%3A/> against <about:blank> 416 416 PASS Parsing: <file:///C%7C/> against <about:blank> 417 PASS Parsing: <file://%43%3A> against <about:blank> 418 PASS Parsing: <file://%43%7C> against <about:blank> 419 PASS Parsing: <file://%43|> against <about:blank> 420 PASS Parsing: <file://C%7C> against <about:blank> 421 PASS Parsing: <file://%43%7C/> against <about:blank> 422 PASS Parsing: <https://%43%7C/> against <about:blank> 423 PASS Parsing: <asdf://%43|/> against <about:blank> 424 PASS Parsing: <asdf://%43%7C/> against <about:blank> 417 425 PASS Parsing: <pix/submit.gif> against <file:///C:/Users/Domenic/Dropbox/GitHub/tmpvar/jsdom/test/level2/html/files/anchor.html> 418 426 PASS Parsing: <..> against <file:///C:/> -
trunk/LayoutTests/imported/w3c/web-platform-tests/url/a-element-origin-expected.txt
r267963 r271899 264 264 FAIL Parsing origin: <wow:> against <about:blank> assert_equals: origin expected "null" but got "wow://" 265 265 PASS Parsing origin: <http://example.com/U+d800�U+dffeU+dfff﷏ﷰ?U+d800�U+dffeU+dfff﷏ﷰ> against <about:blank> 266 PASS Parsing origin: <http://!"$&'()*+,-.;=_`{ |}~/> against <about:blank>267 FAIL Parsing origin: <sc://!"$&'()*+,-.;=_`{ |}~/> against <about:blank> assert_equals: origin expected "null" but got "sc://%1f!\"$&'()*+,-.;=_`{|}~"266 PASS Parsing origin: <http://!"$&'()*+,-.;=_`{}~/> against <about:blank> 267 FAIL Parsing origin: <sc://!"$&'()*+,-.;=_`{}~/> against <about:blank> assert_equals: origin expected "null" but got "sc://%1f!\"$&'()*+,-.;=_`{}~" 268 268 PASS Parsing origin: <ftp://%e2%98%83> against <about:blank> 269 269 PASS Parsing origin: <https://%e2%98%83> against <about:blank> … … 298 298 PASS Parsing origin: <http://256.256.256.256.256> against <http://other.com/> 299 299 PASS Parsing origin: <https://0x.0x.0> against <about:blank> 300 FAIL Parsing origin: <asdf://%43%7C/> against <about:blank> assert_equals: origin expected "null" but got "asdf://%43%7c" 300 301 PASS Parsing origin: <http://[1:0::]> against <http://example.net/> 301 302 FAIL Parsing origin: <sc://ñ> against <about:blank> assert_equals: origin expected "null" but got "sc://%c3%b1" -
trunk/LayoutTests/imported/w3c/web-platform-tests/url/a-element-origin-xhtml-expected.txt
r267963 r271899 264 264 FAIL Parsing origin: <wow:> against <about:blank> assert_equals: origin expected "null" but got "wow://" 265 265 PASS Parsing origin: <http://example.com/U+d800�U+dffeU+dfff﷏ﷰ?U+d800�U+dffeU+dfff﷏ﷰ> against <about:blank> 266 PASS Parsing origin: <http://!"$&'()*+,-.;=_`{ |}~/> against <about:blank>267 FAIL Parsing origin: <sc://!"$&'()*+,-.;=_`{ |}~/> against <about:blank> assert_equals: origin expected "null" but got "sc://%1f!\"$&'()*+,-.;=_`{|}~"266 PASS Parsing origin: <http://!"$&'()*+,-.;=_`{}~/> against <about:blank> 267 FAIL Parsing origin: <sc://!"$&'()*+,-.;=_`{}~/> against <about:blank> assert_equals: origin expected "null" but got "sc://%1f!\"$&'()*+,-.;=_`{}~" 268 268 PASS Parsing origin: <ftp://%e2%98%83> against <about:blank> 269 269 PASS Parsing origin: <https://%e2%98%83> against <about:blank> … … 298 298 PASS Parsing origin: <http://256.256.256.256.256> against <http://other.com/> 299 299 PASS Parsing origin: <https://0x.0x.0> against <about:blank> 300 FAIL Parsing origin: <asdf://%43%7C/> against <about:blank> assert_equals: origin expected "null" but got "asdf://%43%7c" 300 301 PASS Parsing origin: <http://[1:0::]> against <http://example.net/> 301 302 FAIL Parsing origin: <sc://ñ> against <about:blank> assert_equals: origin expected "null" but got "sc://%c3%b1" -
trunk/LayoutTests/imported/w3c/web-platform-tests/url/a-element-xhtml-expected.txt
r268853 r271899 368 368 PASS Parsing: <non-special://a>b> against <about:blank> 369 369 PASS Parsing: <non-special://a^b> against <about:blank> 370 PASS Parsing: <http://!"$&'()*+,-.;=_`{ |}~/> against <about:blank>371 PASS Parsing: <sc://!"$&'()*+,-.;=_`{ |}~/> against <about:blank>370 PASS Parsing: <http://!"$&'()*+,-.;=_`{}~/> against <about:blank> 371 PASS Parsing: <sc://!"$&'()*+,-.;=_`{}~/> against <about:blank> 372 372 PASS Parsing: <ftp://example.com%80/> against <about:blank> 373 373 PASS Parsing: <ftp://example.com%A0/> against <about:blank> … … 415 415 PASS Parsing: <file:///C%3A/> against <about:blank> 416 416 PASS Parsing: <file:///C%7C/> against <about:blank> 417 PASS Parsing: <file://%43%3A> against <about:blank> 418 PASS Parsing: <file://%43%7C> against <about:blank> 419 PASS Parsing: <file://%43|> against <about:blank> 420 PASS Parsing: <file://C%7C> against <about:blank> 421 PASS Parsing: <file://%43%7C/> against <about:blank> 422 PASS Parsing: <https://%43%7C/> against <about:blank> 423 PASS Parsing: <asdf://%43|/> against <about:blank> 424 PASS Parsing: <asdf://%43%7C/> against <about:blank> 417 425 PASS Parsing: <pix/submit.gif> against <file:///C:/Users/Domenic/Dropbox/GitHub/tmpvar/jsdom/test/level2/html/files/anchor.html> 418 426 PASS Parsing: <..> against <file:///C:/> -
trunk/LayoutTests/imported/w3c/web-platform-tests/url/failure-expected.txt
r268479 r271899 269 269 FAIL Location's href: https://256.0.0.1/test should throw assert_throws_js: function "() => self[0].location = test.input" did not throw 270 270 PASS window.open(): https://256.0.0.1/test should throw 271 PASS URL's constructor's base argument: file://%43%3A should throw 272 PASS URL's href: file://%43%3A should throw 273 PASS XHR: file://%43%3A should throw 274 PASS sendBeacon(): file://%43%3A should throw 275 FAIL Location's href: file://%43%3A should throw assert_throws_js: function "() => self[0].location = test.input" did not throw 276 PASS window.open(): file://%43%3A should throw 277 PASS URL's constructor's base argument: file://%43%7C should throw 278 PASS URL's href: file://%43%7C should throw 279 PASS XHR: file://%43%7C should throw 280 PASS sendBeacon(): file://%43%7C should throw 281 FAIL Location's href: file://%43%7C should throw assert_throws_js: function "() => self[0].location = test.input" did not throw 282 PASS window.open(): file://%43%7C should throw 283 PASS URL's constructor's base argument: file://%43| should throw 284 PASS URL's href: file://%43| should throw 285 PASS XHR: file://%43| should throw 286 PASS sendBeacon(): file://%43| should throw 287 FAIL Location's href: file://%43| should throw assert_throws_js: function "() => self[0].location = test.input" did not throw 288 PASS window.open(): file://%43| should throw 289 PASS URL's constructor's base argument: file://C%7C should throw 290 PASS URL's href: file://C%7C should throw 291 PASS XHR: file://C%7C should throw 292 PASS sendBeacon(): file://C%7C should throw 293 FAIL Location's href: file://C%7C should throw assert_throws_js: function "() => self[0].location = test.input" did not throw 294 PASS window.open(): file://C%7C should throw 295 PASS URL's constructor's base argument: file://%43%7C/ should throw 296 PASS URL's href: file://%43%7C/ should throw 297 PASS XHR: file://%43%7C/ should throw 298 PASS sendBeacon(): file://%43%7C/ should throw 299 FAIL Location's href: file://%43%7C/ should throw assert_throws_js: function "() => self[0].location = test.input" did not throw 300 PASS window.open(): file://%43%7C/ should throw 301 PASS URL's constructor's base argument: https://%43%7C/ should throw 302 PASS URL's href: https://%43%7C/ should throw 303 PASS XHR: https://%43%7C/ should throw 304 PASS sendBeacon(): https://%43%7C/ should throw 305 FAIL Location's href: https://%43%7C/ should throw assert_throws_js: function "() => self[0].location = test.input" did not throw 306 PASS window.open(): https://%43%7C/ should throw 307 PASS URL's constructor's base argument: asdf://%43|/ should throw 308 PASS URL's href: asdf://%43|/ should throw 309 PASS XHR: asdf://%43|/ should throw 310 PASS sendBeacon(): asdf://%43|/ should throw 311 FAIL Location's href: asdf://%43|/ should throw assert_throws_js: function "() => self[0].location = test.input" did not throw 312 PASS window.open(): asdf://%43|/ should throw 271 313 PASS URL's constructor's base argument: \\\.\Y: should throw 272 314 PASS URL's href: \\\.\Y: should throw -
trunk/LayoutTests/imported/w3c/web-platform-tests/url/resources/urltestdata.json
r268853 r271899 4683 4683 "Allowed host code points", 4684 4684 { 4685 "input": "http://\u001F!\"$&'()*+,-.;=_`{ |}~/",4686 "base": "about:blank", 4687 "href": "http://\u001F!\"$&'()*+,-.;=_`{ |}~/",4688 "origin": "http://\u001F!\"$&'()*+,-.;=_`{ |}~",4689 "protocol": "http:", 4690 "username": "", 4691 "password": "", 4692 "host": "\u001F!\"$&'()*+,-.;=_`{ |}~",4693 "hostname": "\u001F!\"$&'()*+,-.;=_`{ |}~",4694 "port": "", 4695 "pathname": "/", 4696 "search": "", 4697 "hash": "" 4698 }, 4699 { 4700 "input": "sc://\u001F!\"$&'()*+,-.;=_`{ |}~/",4701 "base": "about:blank", 4702 "href": "sc://%1F!\"$&'()*+,-.;=_`{ |}~/",4685 "input": "http://\u001F!\"$&'()*+,-.;=_`{}~/", 4686 "base": "about:blank", 4687 "href": "http://\u001F!\"$&'()*+,-.;=_`{}~/", 4688 "origin": "http://\u001F!\"$&'()*+,-.;=_`{}~", 4689 "protocol": "http:", 4690 "username": "", 4691 "password": "", 4692 "host": "\u001F!\"$&'()*+,-.;=_`{}~", 4693 "hostname": "\u001F!\"$&'()*+,-.;=_`{}~", 4694 "port": "", 4695 "pathname": "/", 4696 "search": "", 4697 "hash": "" 4698 }, 4699 { 4700 "input": "sc://\u001F!\"$&'()*+,-.;=_`{}~/", 4701 "base": "about:blank", 4702 "href": "sc://%1F!\"$&'()*+,-.;=_`{}~/", 4703 4703 "origin": "null", 4704 4704 "protocol": "sc:", 4705 4705 "username": "", 4706 4706 "password": "", 4707 "host": "%1F!\"$&'()*+,-.;=_`{ |}~",4708 "hostname": "%1F!\"$&'()*+,-.;=_`{ |}~",4707 "host": "%1F!\"$&'()*+,-.;=_`{}~", 4708 "hostname": "%1F!\"$&'()*+,-.;=_`{}~", 4709 4709 "port": "", 4710 4710 "pathname": "/", … … 5200 5200 "port": "", 5201 5201 "pathname": "/C%7C/", 5202 "search": "", 5203 "hash": "" 5204 }, 5205 { 5206 "input": "file://%43%3A", 5207 "base": "about:blank", 5208 "failure": true 5209 }, 5210 { 5211 "input": "file://%43%7C", 5212 "base": "about:blank", 5213 "failure": true 5214 }, 5215 { 5216 "input": "file://%43|", 5217 "base": "about:blank", 5218 "failure": true 5219 }, 5220 { 5221 "input": "file://C%7C", 5222 "base": "about:blank", 5223 "failure": true 5224 }, 5225 { 5226 "input": "file://%43%7C/", 5227 "base": "about:blank", 5228 "failure": true 5229 }, 5230 { 5231 "input": "https://%43%7C/", 5232 "base": "about:blank", 5233 "failure": true 5234 }, 5235 { 5236 "input": "asdf://%43|/", 5237 "base": "about:blank", 5238 "failure": true 5239 }, 5240 { 5241 "input": "asdf://%43%7C/", 5242 "base": "about:blank", 5243 "href": "asdf://%43%7C/", 5244 "origin": "null", 5245 "protocol": "asdf:", 5246 "username": "", 5247 "password": "", 5248 "host": "%43%7C", 5249 "hostname": "%43%7C", 5250 "port": "", 5251 "pathname": "/", 5202 5252 "search": "", 5203 5253 "hash": "" -
trunk/LayoutTests/imported/w3c/web-platform-tests/url/url-constructor-expected.txt
r268853 r271899 367 367 PASS Parsing: <non-special://a>b> against <about:blank> 368 368 PASS Parsing: <non-special://a^b> against <about:blank> 369 PASS Parsing: <http://!"$&'()*+,-.;=_`{ |}~/> against <about:blank>370 PASS Parsing: <sc://!"$&'()*+,-.;=_`{ |}~/> against <about:blank>369 PASS Parsing: <http://!"$&'()*+,-.;=_`{}~/> against <about:blank> 370 PASS Parsing: <sc://!"$&'()*+,-.;=_`{}~/> against <about:blank> 371 371 PASS Parsing: <ftp://example.com%80/> against <about:blank> 372 372 PASS Parsing: <ftp://example.com%A0/> against <about:blank> … … 414 414 PASS Parsing: <file:///C%3A/> against <about:blank> 415 415 PASS Parsing: <file:///C%7C/> against <about:blank> 416 PASS Parsing: <file://%43%3A> against <about:blank> 417 PASS Parsing: <file://%43%7C> against <about:blank> 418 PASS Parsing: <file://%43|> against <about:blank> 419 PASS Parsing: <file://C%7C> against <about:blank> 420 PASS Parsing: <file://%43%7C/> against <about:blank> 421 PASS Parsing: <https://%43%7C/> against <about:blank> 422 PASS Parsing: <asdf://%43|/> against <about:blank> 423 PASS Parsing: <asdf://%43%7C/> against <about:blank> 416 424 PASS Parsing: <pix/submit.gif> against <file:///C:/Users/Domenic/Dropbox/GitHub/tmpvar/jsdom/test/level2/html/files/anchor.html> 417 425 PASS Parsing: <..> against <file:///C:/> -
trunk/LayoutTests/imported/w3c/web-platform-tests/url/url-origin-expected.txt
r267963 r271899 263 263 FAIL Origin parsing: <wow:> against <about:blank> assert_equals: origin expected "null" but got "wow://" 264 264 PASS Origin parsing: <http://example.com/U+d800�U+dffeU+dfff﷏ﷰ?U+d800�U+dffeU+dfff﷏ﷰ> against <about:blank> 265 PASS Origin parsing: <http://!"$&'()*+,-.;=_`{ |}~/> against <about:blank>266 FAIL Origin parsing: <sc://!"$&'()*+,-.;=_`{ |}~/> against <about:blank> assert_equals: origin expected "null" but got "sc://%1f!\"$&'()*+,-.;=_`{|}~"265 PASS Origin parsing: <http://!"$&'()*+,-.;=_`{}~/> against <about:blank> 266 FAIL Origin parsing: <sc://!"$&'()*+,-.;=_`{}~/> against <about:blank> assert_equals: origin expected "null" but got "sc://%1f!\"$&'()*+,-.;=_`{}~" 267 267 PASS Origin parsing: <ftp://%e2%98%83> against <about:blank> 268 268 PASS Origin parsing: <https://%e2%98%83> against <about:blank> … … 297 297 PASS Origin parsing: <http://256.256.256.256.256> against <http://other.com/> 298 298 PASS Origin parsing: <https://0x.0x.0> against <about:blank> 299 FAIL Origin parsing: <asdf://%43%7C/> against <about:blank> assert_equals: origin expected "null" but got "asdf://%43%7c" 299 300 PASS Origin parsing: <http://[1:0::]> against <http://example.net/> 300 301 FAIL Origin parsing: <sc://ñ> against <about:blank> assert_equals: origin expected "null" but got "sc://%c3%b1" -
trunk/Source/WTF/ChangeLog
r271806 r271899 1 2021-01-26 Alex Christensen <achristensen@webkit.org> 2 3 Forbid '|' in URL hosts 4 https://bugs.webkit.org/show_bug.cgi?id=220778 5 6 Reviewed by Youenn Fablet. 7 8 This is one of the proposed solutions to https://github.com/whatwg/url/issues/559 9 and RFC 3986 and 3987 forbid such characters, so let's try forbidding it. 10 11 * wtf/URLParser.cpp: 12 (WTF::isC0Control): 13 (WTF::isForbiddenHostCodePoint): 14 1 15 2021-01-25 Chris Dumez <cdumez@apple.com> 2 16 -
trunk/Source/WTF/wtf/URLParser.cpp
r270818 r271899 187 187 ValidScheme, // 'z' 188 188 UserInfo | Default, // '{' 189 UserInfo , // '|'189 UserInfo | ForbiddenHost, // '|' 190 190 UserInfo | Default, // '}' 191 191 0, // '~' … … 331 331 template<typename CharacterType> ALWAYS_INLINE static bool isSlashQuestionOrHash(CharacterType character) { return character <= '\\' && characterClassTable[character] & SlashQuestionOrHash; } 332 332 template<typename CharacterType> ALWAYS_INLINE static bool isValidSchemeCharacter(CharacterType character) { return character <= 'z' && characterClassTable[character] & ValidScheme; } 333 template<typename CharacterType> ALWAYS_INLINE static bool isForbiddenHostCodePoint(CharacterType character) { return character <= ' ^' && characterClassTable[character] & ForbiddenHost; }333 template<typename CharacterType> ALWAYS_INLINE static bool isForbiddenHostCodePoint(CharacterType character) { return character <= '|' && characterClassTable[character] & ForbiddenHost; } 334 334 ALWAYS_INLINE static bool shouldPercentEncodeQueryByte(uint8_t byte, const bool& urlIsSpecial) 335 335 {
Note: See TracChangeset
for help on using the changeset viewer.