gecko-dev/dom/url
Valentin Gosu 7d213246fb Bug 1555302 - Ensure that nsStandardURL::Resolve() doesn't parse URLs with a different scheme as relative r=mayhemer
Normally, this method will return the entire in string if it has a scheme.
However, mParser->ParseURL may fail, leading to the scheme to be cleared,
and the result will be the same HTTP URL with the input appended to the
path. This triggers the assertion in NS_NewURI that the scheme should not
change.

As a fix, we bail out of nsStandardURL::Resolve() if the parsed scheme of
the input is different than the base URIs current scheme. This condition
is necessary, because we still need to support a deprecated form of relative
URLs like http:file or http:/path/file

Differential Revision: https://phabricator.services.mozilla.com/D33003

--HG--
extra : moz-landing-system : lando
2019-06-04 13:42:37 +00:00
..
tests Bug 1555302 - Ensure that nsStandardURL::Resolve() doesn't parse URLs with a different scheme as relative r=mayhemer 2019-06-04 13:42:37 +00:00
URL.cpp Bug 1523969 part 6 - Move method definition inline comments to new line in 'dom/'. r=nika 2019-02-25 16:05:29 -06:00
URL.h Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
URLMainThread.cpp Bug 1523969 part 6 - Move method definition inline comments to new line in 'dom/'. r=nika 2019-02-25 16:05:29 -06:00
URLMainThread.h Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
URLSearchParams.cpp Bug 1523969 part 6 - Move method definition inline comments to new line in 'dom/'. r=nika 2019-02-25 16:05:29 -06:00
URLSearchParams.h Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
URLWorker.cpp Bug 1536744 - Rename NS_NewURIOnAnyThread to NS_NewURI. r=baku 2019-05-28 14:17:04 +00:00
URLWorker.h Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
moz.build Bug 1544352 - update BUG_COMPONENT for some dom/* and testing/web-platform/* files. r=overholt,jmaher 2019-04-25 09:14:08 +00:00