mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-08 19:04:45 +00:00
Bug 1815925 - Removed second colon check in URL parser. r=valentin,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D178563
This commit is contained in:
parent
1c305eb10b
commit
aba5ef3467
@ -113,8 +113,7 @@ nsBaseURLParser::ParseURL(const char* spec, int32_t specLen,
|
||||
// spec = <scheme>:<authority>
|
||||
// spec = <scheme>:<path-no-slashes>
|
||||
//
|
||||
if (!net_IsValidScheme(nsDependentCSubstring(spec, colon - spec)) ||
|
||||
(*(colon + 1) == ':')) {
|
||||
if (!net_IsValidScheme(nsDependentCSubstring(spec, colon - spec))) {
|
||||
return NS_ERROR_MALFORMED_URI;
|
||||
}
|
||||
SET_RESULT(scheme, offset, colon - spec);
|
||||
|
@ -1,7 +1,4 @@
|
||||
[a-element-origin-xhtml.xhtml]
|
||||
[Parsing origin: <http::b@www.example.com> against <about:blank>]
|
||||
expected: FAIL
|
||||
|
||||
[Parsing origin: <https://0x.0x.0> against <about:blank>]
|
||||
expected: FAIL
|
||||
|
||||
|
@ -1,7 +1,4 @@
|
||||
[a-element-origin.html]
|
||||
[Parsing origin: <http::b@www.example.com> against <about:blank>]
|
||||
expected: FAIL
|
||||
|
||||
[Parsing origin: <https://0x.0x.0> against <about:blank>]
|
||||
expected: FAIL
|
||||
|
||||
|
@ -2,9 +2,6 @@
|
||||
[Parsing: <a:\t foo.com> against <http://example.org/foo/bar>]
|
||||
expected: FAIL
|
||||
|
||||
[Parsing: <http::@c:29> against <http://example.org/foo/bar>]
|
||||
expected: FAIL
|
||||
|
||||
[Parsing: <http://foo.com:b@d/> against <http://example.org/foo/bar>]
|
||||
expected: FAIL
|
||||
|
||||
@ -137,9 +134,6 @@
|
||||
[Parsing: <mailto:example.com/> against <about:blank>]
|
||||
expected: FAIL
|
||||
|
||||
[Parsing: <http::b@www.example.com> against <about:blank>]
|
||||
expected: FAIL
|
||||
|
||||
[Parsing: <http://www.@pple.com> against <about:blank>]
|
||||
expected: FAIL
|
||||
|
||||
@ -998,9 +992,6 @@
|
||||
[Parsing: <non-special://f:999999/c> against <http://example.org/foo/bar>]
|
||||
expected: FAIL
|
||||
|
||||
[Parsing: <http::@c:29> against <http://example.org/foo/bar>]
|
||||
expected: FAIL
|
||||
|
||||
[Parsing: <http://foo.com:b@d/> against <http://example.org/foo/bar>]
|
||||
expected: FAIL
|
||||
|
||||
@ -1025,9 +1016,6 @@
|
||||
[Parsing: <gopher://foo:443/> against <about:blank>]
|
||||
expected: FAIL
|
||||
|
||||
[Parsing: <http::b@www.example.com> against <about:blank>]
|
||||
expected: FAIL
|
||||
|
||||
[Parsing: <http://www.@pple.com> against <about:blank>]
|
||||
expected: FAIL
|
||||
|
||||
|
@ -4,9 +4,6 @@
|
||||
[Parsing: <a:\t foo.com> against <http://example.org/foo/bar>]
|
||||
expected: FAIL
|
||||
|
||||
[Parsing: <http::@c:29> against <http://example.org/foo/bar>]
|
||||
expected: FAIL
|
||||
|
||||
[Parsing: <http://foo.com:b@d/> against <http://example.org/foo/bar>]
|
||||
expected: FAIL
|
||||
|
||||
@ -139,9 +136,6 @@
|
||||
[Parsing: <mailto:example.com/> against <about:blank>]
|
||||
expected: FAIL
|
||||
|
||||
[Parsing: <http::b@www.example.com> against <about:blank>]
|
||||
expected: FAIL
|
||||
|
||||
[Parsing: <http://www.@pple.com> against <about:blank>]
|
||||
expected: FAIL
|
||||
|
||||
@ -1027,9 +1021,6 @@
|
||||
[Parsing: <non-special://f:999999/c> against <http://example.org/foo/bar>]
|
||||
expected: FAIL
|
||||
|
||||
[Parsing: <http::@c:29> against <http://example.org/foo/bar>]
|
||||
expected: FAIL
|
||||
|
||||
[Parsing: <http://foo.com:b@d/> against <http://example.org/foo/bar>]
|
||||
expected: FAIL
|
||||
|
||||
@ -1054,9 +1045,6 @@
|
||||
[Parsing: <gopher://foo:443/> against <about:blank>]
|
||||
expected: FAIL
|
||||
|
||||
[Parsing: <http::b@www.example.com> against <about:blank>]
|
||||
expected: FAIL
|
||||
|
||||
[Parsing: <http://www.@pple.com> against <about:blank>]
|
||||
expected: FAIL
|
||||
|
||||
|
@ -13,9 +13,6 @@
|
||||
[Parsing: <foo://> against <http://example.org/foo/bar>]
|
||||
expected: FAIL
|
||||
|
||||
[Parsing: <http::@c:29> against <http://example.org/foo/bar>]
|
||||
expected: FAIL
|
||||
|
||||
[Parsing: <http://foo.com:b@d/> against <http://example.org/foo/bar>]
|
||||
expected: FAIL
|
||||
|
||||
@ -73,9 +70,6 @@
|
||||
[Parsing: <gopher://foo:443/> against <about:blank>]
|
||||
expected: FAIL
|
||||
|
||||
[Parsing: <http::b@www.example.com> against <about:blank>]
|
||||
expected: FAIL
|
||||
|
||||
[Parsing: <http://www.@pple.com> against <about:blank>]
|
||||
expected: FAIL
|
||||
|
||||
@ -617,9 +611,6 @@
|
||||
[Parsing: <foo://> against <http://example.org/foo/bar>]
|
||||
expected: FAIL
|
||||
|
||||
[Parsing: <http::@c:29> against <http://example.org/foo/bar>]
|
||||
expected: FAIL
|
||||
|
||||
[Parsing: <http://foo.com:b@d/> against <http://example.org/foo/bar>]
|
||||
expected: FAIL
|
||||
|
||||
@ -677,9 +668,6 @@
|
||||
[Parsing: <gopher://foo:443/> against <about:blank>]
|
||||
expected: FAIL
|
||||
|
||||
[Parsing: <http::b@www.example.com> against <about:blank>]
|
||||
expected: FAIL
|
||||
|
||||
[Parsing: <http://www.@pple.com> against <about:blank>]
|
||||
expected: FAIL
|
||||
|
||||
@ -1236,9 +1224,6 @@
|
||||
[Parsing: <foo://> against <http://example.org/foo/bar>]
|
||||
expected: FAIL
|
||||
|
||||
[Parsing: <http::@c:29> against <http://example.org/foo/bar>]
|
||||
expected: FAIL
|
||||
|
||||
[Parsing: <http://foo.com:b@d/> against <http://example.org/foo/bar>]
|
||||
expected: FAIL
|
||||
|
||||
@ -1371,9 +1356,6 @@
|
||||
[Parsing: <gopher://foo:443/> without base]
|
||||
expected: FAIL
|
||||
|
||||
[Parsing: <http::b@www.example.com> without base]
|
||||
expected: FAIL
|
||||
|
||||
[Parsing: <http://www.@pple.com> without base]
|
||||
expected: FAIL
|
||||
|
||||
@ -2070,9 +2052,6 @@
|
||||
[Parsing: <foo://> against <http://example.org/foo/bar>]
|
||||
expected: FAIL
|
||||
|
||||
[Parsing: <http::@c:29> against <http://example.org/foo/bar>]
|
||||
expected: FAIL
|
||||
|
||||
[Parsing: <http://foo.com:b@d/> against <http://example.org/foo/bar>]
|
||||
expected: FAIL
|
||||
|
||||
@ -2205,9 +2184,6 @@
|
||||
[Parsing: <gopher://foo:443/> without base]
|
||||
expected: FAIL
|
||||
|
||||
[Parsing: <http::b@www.example.com> without base]
|
||||
expected: FAIL
|
||||
|
||||
[Parsing: <http://www.@pple.com> without base]
|
||||
expected: FAIL
|
||||
|
||||
|
@ -5,9 +5,6 @@
|
||||
[Origin parsing: <http://999999999.> against <http://other.com/>]
|
||||
expected: FAIL
|
||||
|
||||
[Origin parsing: <http::b@www.example.com> without base]
|
||||
expected: FAIL
|
||||
|
||||
[Origin parsing: <http://!"$&'()*+,-.;=_`{}~/> without base]
|
||||
expected: FAIL
|
||||
|
||||
@ -25,9 +22,6 @@
|
||||
[Origin parsing: <http://999999999.> against <http://other.com/>]
|
||||
expected: FAIL
|
||||
|
||||
[Origin parsing: <http::b@www.example.com> without base]
|
||||
expected: FAIL
|
||||
|
||||
[Origin parsing: <http://!"$&'()*+,-.;=_`{}~/> without base]
|
||||
expected: FAIL
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user