forked from mirrors/gecko-dev
Backed out 2 changesets (bug 1790287) for causing Bug 1812158 CLOSED TREE
Backed out changeset 4551710b517e (bug 1790287) Backed out changeset 7295f8ccd81d (bug 1790287)
This commit is contained in:
parent
6c240d77ec
commit
f97d09d67d
6 changed files with 138 additions and 1228 deletions
|
|
@ -326,16 +326,13 @@ NS_IMETHODIMP nsIDNService::IsACE(const nsACString& input, bool* _retval) {
|
||||||
auto stringContains = [](const nsACString& haystack,
|
auto stringContains = [](const nsACString& haystack,
|
||||||
const nsACString& needle) {
|
const nsACString& needle) {
|
||||||
return std::search(haystack.BeginReading(), haystack.EndReading(),
|
return std::search(haystack.BeginReading(), haystack.EndReading(),
|
||||||
needle.BeginReading(), needle.EndReading(),
|
needle.BeginReading(),
|
||||||
[](unsigned char ch1, unsigned char ch2) {
|
needle.EndReading()) != haystack.EndReading();
|
||||||
return tolower(ch1) == tolower(ch2);
|
|
||||||
}) != haystack.EndReading();
|
|
||||||
};
|
};
|
||||||
|
|
||||||
*_retval =
|
*_retval = StringBeginsWith(input, "xn--"_ns) ||
|
||||||
StringBeginsWith(input, "xn--"_ns, nsCaseInsensitiveCStringComparator) ||
|
(!input.IsEmpty() && input[0] != '.' &&
|
||||||
(!input.IsEmpty() && input[0] != '.' &&
|
stringContains(input, ".xn--"_ns));
|
||||||
stringContains(input, ".xn--"_ns));
|
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -542,7 +539,7 @@ nsresult nsIDNService::stringPrepAndACE(const nsAString& in, nsACString& out,
|
||||||
if (IsAscii(in)) {
|
if (IsAscii(in)) {
|
||||||
LossyCopyUTF16toASCII(in, out);
|
LossyCopyUTF16toASCII(in, out);
|
||||||
// If label begins with xn-- we still want to check its validity
|
// If label begins with xn-- we still want to check its validity
|
||||||
if (!StringBeginsWith(in, u"xn--"_ns, nsCaseInsensitiveStringComparator)) {
|
if (!StringBeginsWith(in, u"xn--"_ns)) {
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1040,8 +1040,4 @@ add_task(function test_jarURI_serialization() {
|
||||||
add_task(async function round_trip_invalid_ace_label() {
|
add_task(async function round_trip_invalid_ace_label() {
|
||||||
let uri = Services.io.newURI("http://xn--xn--d--fg4n-5y45d/");
|
let uri = Services.io.newURI("http://xn--xn--d--fg4n-5y45d/");
|
||||||
Assert.equal(uri.spec, "http://xn--xn--d--fg4n-5y45d/");
|
Assert.equal(uri.spec, "http://xn--xn--d--fg4n-5y45d/");
|
||||||
|
|
||||||
Assert.throws(() => {
|
|
||||||
uri = Services.io.newURI("http://a.b.c.XN--pokxncvks");
|
|
||||||
}, /NS_ERROR_MALFORMED_URI/);
|
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -1097,6 +1097,38 @@
|
||||||
[Parsing: <http://www.@pple.com> against <about:blank>]
|
[Parsing: <http://www.@pple.com> against <about:blank>]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
[Parsing: <http://a.b.c.XN--pokxncvks> against <about:blank>]
|
||||||
|
expected:
|
||||||
|
if not debug and (os == "linux") and fission: [FAIL, PASS]
|
||||||
|
if not debug and (os == "linux") and not fission: [FAIL, PASS]
|
||||||
|
if not debug and (os == "mac"): [FAIL, PASS]
|
||||||
|
if not debug and (os == "android"): [FAIL, PASS]
|
||||||
|
FAIL
|
||||||
|
|
||||||
|
[Parsing: <http://a.b.c.Xn--pokxncvks> against <about:blank>]
|
||||||
|
expected:
|
||||||
|
if not debug and (os == "linux") and fission: [FAIL, PASS]
|
||||||
|
if not debug and (os == "linux") and not fission: [FAIL, PASS]
|
||||||
|
if not debug and (os == "android"): [FAIL, PASS]
|
||||||
|
if not debug and (os == "mac"): [FAIL, PASS]
|
||||||
|
FAIL
|
||||||
|
|
||||||
|
[Parsing: <http://10.0.0.XN--pokxncvks> against <about:blank>]
|
||||||
|
expected:
|
||||||
|
if not debug and (os == "linux") and fission: [FAIL, PASS]
|
||||||
|
if not debug and (os == "linux") and not fission: [FAIL, PASS]
|
||||||
|
if not debug and (os == "android"): [FAIL, PASS]
|
||||||
|
if not debug and (os == "mac"): [FAIL, PASS]
|
||||||
|
FAIL
|
||||||
|
|
||||||
|
[Parsing: <http://10.0.0.xN--pokxncvks> against <about:blank>]
|
||||||
|
expected:
|
||||||
|
if not debug and (os == "linux") and not fission: [FAIL, PASS]
|
||||||
|
if not debug and (os == "linux") and fission: [FAIL, PASS]
|
||||||
|
if not debug and (os == "mac"): [FAIL, PASS]
|
||||||
|
if not debug and (os == "android"): [FAIL, PASS]
|
||||||
|
FAIL
|
||||||
|
|
||||||
[Parsing: <sc://faß.ExAmPlE/> against <about:blank>]
|
[Parsing: <sc://faß.ExAmPlE/> against <about:blank>]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1126,6 +1126,38 @@
|
||||||
[Parsing: <http://www.@pple.com> against <about:blank>]
|
[Parsing: <http://www.@pple.com> against <about:blank>]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
[Parsing: <http://a.b.c.XN--pokxncvks> against <about:blank>]
|
||||||
|
expected:
|
||||||
|
if not debug and (os == "linux") and not fission: [FAIL, PASS]
|
||||||
|
if not debug and (os == "linux") and fission: [FAIL, PASS]
|
||||||
|
if not debug and (os == "android"): [FAIL, PASS]
|
||||||
|
if not debug and (os == "mac"): [FAIL, PASS]
|
||||||
|
FAIL
|
||||||
|
|
||||||
|
[Parsing: <http://a.b.c.Xn--pokxncvks> against <about:blank>]
|
||||||
|
expected:
|
||||||
|
if not debug and (os == "linux") and not fission: [FAIL, PASS]
|
||||||
|
if not debug and (os == "linux") and fission: [FAIL, PASS]
|
||||||
|
if not debug and (os == "mac"): [FAIL, PASS]
|
||||||
|
if not debug and (os == "android"): [FAIL, PASS]
|
||||||
|
FAIL
|
||||||
|
|
||||||
|
[Parsing: <http://10.0.0.XN--pokxncvks> against <about:blank>]
|
||||||
|
expected:
|
||||||
|
if not debug and (os == "linux") and fission: [FAIL, PASS]
|
||||||
|
if not debug and (os == "linux") and not fission: [FAIL, PASS]
|
||||||
|
if not debug and (os == "mac"): [FAIL, PASS]
|
||||||
|
if not debug and (os == "android"): [FAIL, PASS]
|
||||||
|
FAIL
|
||||||
|
|
||||||
|
[Parsing: <http://10.0.0.xN--pokxncvks> against <about:blank>]
|
||||||
|
expected:
|
||||||
|
if not debug and (os == "linux") and not fission: [FAIL, PASS]
|
||||||
|
if not debug and (os == "linux") and fission: [FAIL, PASS]
|
||||||
|
if not debug and (os == "mac"): [FAIL, PASS]
|
||||||
|
if not debug and (os == "android"): [FAIL, PASS]
|
||||||
|
FAIL
|
||||||
|
|
||||||
[Parsing: <sc://faß.ExAmPlE/> against <about:blank>]
|
[Parsing: <sc://faß.ExAmPlE/> against <about:blank>]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load diff
|
|
@ -1257,6 +1257,38 @@
|
||||||
[Parsing: <http://www.@pple.com> against <about:blank>]
|
[Parsing: <http://www.@pple.com> against <about:blank>]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
[Parsing: <http://a.b.c.XN--pokxncvks> against <about:blank>]
|
||||||
|
expected:
|
||||||
|
if not debug and (os == "linux") and fission: [FAIL, PASS]
|
||||||
|
if not debug and (os == "linux") and not fission: [FAIL, PASS]
|
||||||
|
if not debug and (os == "android"): [FAIL, PASS]
|
||||||
|
if not debug and (os == "mac"): [FAIL, PASS]
|
||||||
|
FAIL
|
||||||
|
|
||||||
|
[Parsing: <http://a.b.c.Xn--pokxncvks> against <about:blank>]
|
||||||
|
expected:
|
||||||
|
if not debug and (os == "linux") and fission: [FAIL, PASS]
|
||||||
|
if not debug and (os == "linux") and not fission: [FAIL, PASS]
|
||||||
|
if not debug and (os == "mac"): [FAIL, PASS]
|
||||||
|
if not debug and (os == "android"): [FAIL, PASS]
|
||||||
|
FAIL
|
||||||
|
|
||||||
|
[Parsing: <http://10.0.0.XN--pokxncvks> against <about:blank>]
|
||||||
|
expected:
|
||||||
|
if not debug and (os == "linux") and fission: [FAIL, PASS]
|
||||||
|
if not debug and (os == "linux") and not fission: [FAIL, PASS]
|
||||||
|
if not debug and (os == "mac"): [FAIL, PASS]
|
||||||
|
if not debug and (os == "android"): [FAIL, PASS]
|
||||||
|
FAIL
|
||||||
|
|
||||||
|
[Parsing: <http://10.0.0.xN--pokxncvks> against <about:blank>]
|
||||||
|
expected:
|
||||||
|
if not debug and (os == "linux") and fission: [FAIL, PASS]
|
||||||
|
if not debug and (os == "linux") and not fission: [FAIL, PASS]
|
||||||
|
if not debug and (os == "mac"): [FAIL, PASS]
|
||||||
|
if not debug and (os == "android"): [FAIL, PASS]
|
||||||
|
FAIL
|
||||||
|
|
||||||
[Parsing: <sc://faß.ExAmPlE/> against <about:blank>]
|
[Parsing: <sc://faß.ExAmPlE/> against <about:blank>]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
|
@ -2001,6 +2033,38 @@
|
||||||
[Parsing: <http://www.@pple.com> against <about:blank>]
|
[Parsing: <http://www.@pple.com> against <about:blank>]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
[Parsing: <http://a.b.c.XN--pokxncvks> against <about:blank>]
|
||||||
|
expected:
|
||||||
|
if not debug and (os == "linux") and fission: [FAIL, PASS]
|
||||||
|
if not debug and (os == "linux") and not fission: [FAIL, PASS]
|
||||||
|
if not debug and (os == "android"): [FAIL, PASS]
|
||||||
|
if not debug and (os == "mac"): [FAIL, PASS]
|
||||||
|
FAIL
|
||||||
|
|
||||||
|
[Parsing: <http://a.b.c.Xn--pokxncvks> against <about:blank>]
|
||||||
|
expected:
|
||||||
|
if not debug and (os == "linux") and fission: [FAIL, PASS]
|
||||||
|
if not debug and (os == "linux") and not fission: [FAIL, PASS]
|
||||||
|
if not debug and (os == "android"): [FAIL, PASS]
|
||||||
|
if not debug and (os == "mac"): [FAIL, PASS]
|
||||||
|
FAIL
|
||||||
|
|
||||||
|
[Parsing: <http://10.0.0.XN--pokxncvks> against <about:blank>]
|
||||||
|
expected:
|
||||||
|
if not debug and (os == "linux") and fission: [FAIL, PASS]
|
||||||
|
if not debug and (os == "linux") and not fission: [FAIL, PASS]
|
||||||
|
if not debug and (os == "android"): [FAIL, PASS]
|
||||||
|
if not debug and (os == "mac"): [FAIL, PASS]
|
||||||
|
FAIL
|
||||||
|
|
||||||
|
[Parsing: <http://10.0.0.xN--pokxncvks> against <about:blank>]
|
||||||
|
expected:
|
||||||
|
if not debug and (os == "linux") and fission: [FAIL, PASS]
|
||||||
|
if not debug and (os == "linux") and not fission: [FAIL, PASS]
|
||||||
|
if not debug and (os == "android"): [FAIL, PASS]
|
||||||
|
if not debug and (os == "mac"): [FAIL, PASS]
|
||||||
|
FAIL
|
||||||
|
|
||||||
[Parsing: <sc://faß.ExAmPlE/> against <about:blank>]
|
[Parsing: <sc://faß.ExAmPlE/> against <about:blank>]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue