зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset 9ad299b5161b (bug 1495313) for failing mochitest dom/security/test/cors/test_CrossSiteXHR.html on a CLOSED TREE
This commit is contained in:
Родитель
b4e99947d0
Коммит
7c4a91dd37
|
@ -714,13 +714,12 @@ nsStandardURL::BuildNormalizedSpec(const char *spec,
|
|||
{
|
||||
nsSegmentEncoder encoder;
|
||||
nsSegmentEncoder queryEncoder(encoding);
|
||||
// Items using an extraLen of 1 don't add anything unless mLen > 0
|
||||
// Username@
|
||||
approxLen += encoder.EncodeSegmentCount(spec, mUsername, esc_Username, encUsername, useEncUsername, 0);
|
||||
approxLen += 1; // reserve length for @
|
||||
approxLen += encoder.EncodeSegmentCount(spec, mUsername, esc_Username, encUsername, useEncUsername, 1);
|
||||
// :password - we insert the ':' even if there's no actual password if "user:@" was in the spec
|
||||
if (mPassword.mLen > 0) {
|
||||
if (mPassword.mLen >= 0)
|
||||
approxLen += 1 + encoder.EncodeSegmentCount(spec, mPassword, esc_Password, encPassword, useEncPassword);
|
||||
}
|
||||
// mHost is handled differently below due to encoding differences
|
||||
MOZ_ASSERT(mPort >= -1, "Invalid negative mPort");
|
||||
if (mPort != -1 && mPort != mDefaultPort)
|
||||
|
@ -832,14 +831,10 @@ nsStandardURL::BuildNormalizedSpec(const char *spec,
|
|||
mAuthority.mPos = i;
|
||||
|
||||
// append authority
|
||||
if (mUsername.mLen > 0 || mPassword.mLen > 0) {
|
||||
if (mUsername.mLen > 0) {
|
||||
i = AppendSegmentToBuf(buf, i, spec, username, mUsername,
|
||||
&encUsername, useEncUsername, &diff);
|
||||
ShiftFromPassword(diff);
|
||||
} else {
|
||||
mUsername.mLen = -1;
|
||||
}
|
||||
if (mUsername.mLen > 0) {
|
||||
i = AppendSegmentToBuf(buf, i, spec, username, mUsername,
|
||||
&encUsername, useEncUsername, &diff);
|
||||
ShiftFromPassword(diff);
|
||||
if (password.mLen > 0) {
|
||||
buf[i++] = ':';
|
||||
i = AppendSegmentToBuf(buf, i, spec, password, mPassword,
|
||||
|
@ -849,9 +844,6 @@ nsStandardURL::BuildNormalizedSpec(const char *spec,
|
|||
mPassword.mLen = -1;
|
||||
}
|
||||
buf[i++] = '@';
|
||||
} else {
|
||||
mUsername.mLen = -1;
|
||||
mPassword.mLen = -1;
|
||||
}
|
||||
if (host.mLen > 0) {
|
||||
i = AppendSegmentToBuf(buf, i, spec, host, mHost, &encHost, useEncHost,
|
||||
|
@ -971,7 +963,6 @@ nsStandardURL::BuildNormalizedSpec(const char *spec,
|
|||
MOZ_ASSERT(mSpec.Length() <= (uint32_t) net_GetURLMaxLength(),
|
||||
"The spec should never be this long, we missed a check.");
|
||||
|
||||
MOZ_ASSERT(mUsername.mLen != 0 && mPassword.mLen != 0);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
@ -1272,7 +1263,7 @@ nsStandardURL::GetSensitiveInfoHiddenSpec(nsACString &result)
|
|||
if (NS_FAILED(rv)) {
|
||||
return rv;
|
||||
}
|
||||
if (mPassword.mLen > 0) {
|
||||
if (mPassword.mLen >= 0) {
|
||||
result.ReplaceLiteral(mPassword.mPos, mPassword.mLen, "****");
|
||||
}
|
||||
return NS_OK;
|
||||
|
@ -1678,6 +1669,22 @@ nsStandardURL::SetUserPass(const nsACString &input)
|
|||
|
||||
InvalidateCache();
|
||||
|
||||
if (userpass.IsEmpty()) {
|
||||
// remove user:pass
|
||||
if (mUsername.mLen > 0) {
|
||||
if (mPassword.mLen > 0)
|
||||
mUsername.mLen += (mPassword.mLen + 1);
|
||||
mUsername.mLen++;
|
||||
mSpec.Cut(mUsername.mPos, mUsername.mLen);
|
||||
mAuthority.mLen -= mUsername.mLen;
|
||||
ShiftFromHost(-mUsername.mLen);
|
||||
mUsername.mLen = -1;
|
||||
mPassword.mLen = -1;
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_ASSERTION(mHost.mLen >= 0, "uninitialized");
|
||||
|
||||
nsresult rv;
|
||||
|
@ -1691,7 +1698,7 @@ nsStandardURL::SetUserPass(const nsACString &input)
|
|||
|
||||
// build new user:pass in |buf|
|
||||
nsAutoCString buf;
|
||||
if (usernameLen > 0 || passwordLen > 0) {
|
||||
if (usernameLen > 0) {
|
||||
nsSegmentEncoder encoder;
|
||||
bool ignoredOut;
|
||||
usernameLen = encoder.EncodeSegmentCount(userpass.get(),
|
||||
|
@ -1710,14 +1717,13 @@ nsStandardURL::SetUserPass(const nsACString &input)
|
|||
} else {
|
||||
passwordLen = -1;
|
||||
}
|
||||
if (mUsername.mLen < 0 && mPassword.mLen < 0) {
|
||||
if (mUsername.mLen < 0)
|
||||
buf.Append('@');
|
||||
}
|
||||
}
|
||||
|
||||
int32_t shift = 0;
|
||||
uint32_t shift = 0;
|
||||
|
||||
if (mUsername.mLen < 0 && mPassword.mLen < 0) {
|
||||
if (mUsername.mLen < 0) {
|
||||
// no existing user:pass
|
||||
if (!buf.IsEmpty()) {
|
||||
mSpec.Insert(buf, mHost.mPos);
|
||||
|
@ -1727,38 +1733,23 @@ nsStandardURL::SetUserPass(const nsACString &input)
|
|||
}
|
||||
else {
|
||||
// replace existing user:pass
|
||||
uint32_t userpassLen = 0;
|
||||
if (mUsername.mLen > 0) {
|
||||
userpassLen += mUsername.mLen;
|
||||
}
|
||||
if (mPassword.mLen > 0) {
|
||||
uint32_t userpassLen = mUsername.mLen;
|
||||
if (mPassword.mLen >= 0)
|
||||
userpassLen += (mPassword.mLen + 1);
|
||||
}
|
||||
if (buf.IsEmpty()) {
|
||||
// remove `@` character too
|
||||
userpassLen++;
|
||||
}
|
||||
mSpec.Replace(mAuthority.mPos, userpassLen, buf);
|
||||
mSpec.Replace(mUsername.mPos, userpassLen, buf);
|
||||
shift = buf.Length() - userpassLen;
|
||||
}
|
||||
if (shift) {
|
||||
ShiftFromHost(shift);
|
||||
MOZ_DIAGNOSTIC_ASSERT(mAuthority.mLen >= -shift);
|
||||
mAuthority.mLen += shift;
|
||||
}
|
||||
// update positions and lengths
|
||||
mUsername.mLen = usernameLen > 0 ? usernameLen : -1;
|
||||
mUsername.mPos = mAuthority.mPos;
|
||||
mPassword.mLen = passwordLen > 0 ? passwordLen : -1;
|
||||
mUsername.mLen = usernameLen;
|
||||
mPassword.mLen = passwordLen;
|
||||
if (passwordLen > 0) {
|
||||
if (mUsername.mLen > 0) {
|
||||
mPassword.mPos = mUsername.mPos + mUsername.mLen + 1;
|
||||
} else {
|
||||
mPassword.mPos = mAuthority.mPos + 1;
|
||||
}
|
||||
mPassword.mPos = mUsername.mPos + mUsername.mLen + 1;
|
||||
}
|
||||
|
||||
MOZ_ASSERT(mUsername.mLen != 0 && mPassword.mLen != 0);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
@ -1776,6 +1767,9 @@ nsStandardURL::SetUsername(const nsACString &input)
|
|||
return NS_ERROR_UNEXPECTED;
|
||||
}
|
||||
|
||||
if (username.IsEmpty())
|
||||
return SetUserPass(username);
|
||||
|
||||
if (mSpec.Length() + input.Length() - Username().Length() > (uint32_t) net_GetURLMaxLength()) {
|
||||
return NS_ERROR_MALFORMED_URI;
|
||||
}
|
||||
|
@ -1788,36 +1782,22 @@ nsStandardURL::SetUsername(const nsACString &input)
|
|||
const nsACString &escUsername =
|
||||
encoder.EncodeSegment(username, esc_Username, buf);
|
||||
|
||||
int32_t shift = 0;
|
||||
int32_t shift;
|
||||
|
||||
if (mUsername.mLen < 0 && escUsername.IsEmpty()) {
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
if (mUsername.mLen < 0 && mPassword.mLen < 0) {
|
||||
MOZ_ASSERT(!escUsername.IsEmpty(), "Should not be empty at this point");
|
||||
if (mUsername.mLen < 0) {
|
||||
mUsername.mPos = mAuthority.mPos;
|
||||
mSpec.Insert(escUsername + NS_LITERAL_CSTRING("@"), mUsername.mPos);
|
||||
shift = escUsername.Length() + 1;
|
||||
mUsername.mLen = escUsername.Length() > 0 ? escUsername.Length() : -1;
|
||||
}
|
||||
else {
|
||||
uint32_t pos = mUsername.mLen < 0 ? mAuthority.mPos : mUsername.mPos;
|
||||
int32_t len = mUsername.mLen < 0 ? 0 : mUsername.mLen;
|
||||
|
||||
if (mPassword.mLen < 0 && escUsername.IsEmpty()) {
|
||||
len++; // remove the @ character too
|
||||
}
|
||||
shift = ReplaceSegment(pos, len, escUsername);
|
||||
mUsername.mLen = escUsername.Length() > 0 ? escUsername.Length() : -1;
|
||||
}
|
||||
else
|
||||
shift = ReplaceSegment(mUsername.mPos, mUsername.mLen, escUsername);
|
||||
|
||||
if (shift) {
|
||||
mUsername.mLen = escUsername.Length();
|
||||
mAuthority.mLen += shift;
|
||||
ShiftFromPassword(shift);
|
||||
}
|
||||
|
||||
MOZ_ASSERT(mUsername.mLen != 0 && mPassword.mLen != 0);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
@ -1843,6 +1823,14 @@ nsStandardURL::SetPassword(const nsACString &input)
|
|||
NS_WARNING("cannot set password on no-auth url");
|
||||
return NS_ERROR_UNEXPECTED;
|
||||
}
|
||||
if (mUsername.mLen <= 0) {
|
||||
if (password.IsEmpty()) {
|
||||
MOZ_DIAGNOSTIC_ASSERT(Password().IsEmpty());
|
||||
return NS_OK;
|
||||
}
|
||||
NS_WARNING("cannot set password without existing username");
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
if (mSpec.Length() + input.Length() - Password().Length() > (uint32_t) net_GetURLMaxLength()) {
|
||||
return NS_ERROR_MALFORMED_URI;
|
||||
|
@ -1851,19 +1839,13 @@ nsStandardURL::SetPassword(const nsACString &input)
|
|||
InvalidateCache();
|
||||
|
||||
if (password.IsEmpty()) {
|
||||
if (mPassword.mLen > 0) {
|
||||
if (mPassword.mLen >= 0) {
|
||||
// cut(":password")
|
||||
int32_t len = mPassword.mLen;
|
||||
if (mUsername.mLen < 0) {
|
||||
len++; // also cut the @ character
|
||||
}
|
||||
len++; // for the : character
|
||||
mSpec.Cut(mPassword.mPos - 1, len);
|
||||
ShiftFromHost(-len);
|
||||
mAuthority.mLen -= len;
|
||||
mSpec.Cut(mPassword.mPos - 1, mPassword.mLen + 1);
|
||||
ShiftFromHost(-(mPassword.mLen + 1));
|
||||
mAuthority.mLen -= (mPassword.mLen + 1);
|
||||
mPassword.mLen = -1;
|
||||
}
|
||||
MOZ_ASSERT(mUsername.mLen != 0 && mPassword.mLen != 0);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
@ -1876,15 +1858,9 @@ nsStandardURL::SetPassword(const nsACString &input)
|
|||
int32_t shift;
|
||||
|
||||
if (mPassword.mLen < 0) {
|
||||
if (mUsername.mLen > 0) {
|
||||
mPassword.mPos = mUsername.mPos + mUsername.mLen + 1;
|
||||
mSpec.Insert(NS_LITERAL_CSTRING(":") + escPassword, mPassword.mPos - 1);
|
||||
shift = escPassword.Length() + 1;
|
||||
} else {
|
||||
mPassword.mPos = mAuthority.mPos + 1;
|
||||
mSpec.Insert(NS_LITERAL_CSTRING(":") + escPassword + NS_LITERAL_CSTRING("@"), mPassword.mPos - 1);
|
||||
shift = escPassword.Length() + 2;
|
||||
}
|
||||
mPassword.mPos = mUsername.mPos + mUsername.mLen + 1;
|
||||
mSpec.Insert(NS_LITERAL_CSTRING(":") + escPassword, mPassword.mPos - 1);
|
||||
shift = escPassword.Length() + 1;
|
||||
}
|
||||
else
|
||||
shift = ReplaceSegment(mPassword.mPos, mPassword.mLen, escPassword);
|
||||
|
@ -1894,8 +1870,6 @@ nsStandardURL::SetPassword(const nsACString &input)
|
|||
mAuthority.mLen += shift;
|
||||
ShiftFromHost(shift);
|
||||
}
|
||||
|
||||
MOZ_ASSERT(mUsername.mLen != 0 && mPassword.mLen != 0);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
|
|
@ -534,18 +534,12 @@ inline const nsDependentCSubstring
|
|||
nsStandardURL::Userpass(bool includeDelim)
|
||||
{
|
||||
uint32_t pos=0, len=0;
|
||||
if (mUsername.mLen > 0 || mPassword.mLen > 0) {
|
||||
if (mUsername.mLen > 0) {
|
||||
pos = mUsername.mPos;
|
||||
len = mUsername.mLen;
|
||||
if (mPassword.mLen >= 0) {
|
||||
len += (mPassword.mLen + 1);
|
||||
}
|
||||
} else {
|
||||
pos = mPassword.mPos - 1;
|
||||
len = mPassword.mLen + 1;
|
||||
}
|
||||
|
||||
// if there is no username, then there can be no password
|
||||
if (mUsername.mLen > 0) {
|
||||
pos = mUsername.mPos;
|
||||
len = mUsername.mLen;
|
||||
if (mPassword.mLen >= 0)
|
||||
len += (mPassword.mLen + 1);
|
||||
if (includeDelim)
|
||||
len++;
|
||||
}
|
||||
|
|
|
@ -535,6 +535,10 @@ nsAuthURLParser::ParseUserInfo(const char *userinfo, int32_t userinfoLen,
|
|||
const char *p = (const char *) memchr(userinfo, ':', userinfoLen);
|
||||
if (p) {
|
||||
// userinfo = <username:password>
|
||||
if (p == userinfo) {
|
||||
// must have a username!
|
||||
return NS_ERROR_MALFORMED_URI;
|
||||
}
|
||||
SET_RESULT(username, 0, p - userinfo);
|
||||
SET_RESULT(password, p - userinfo + 1, userinfoLen - (p - userinfo + 1));
|
||||
}
|
||||
|
|
|
@ -544,90 +544,14 @@ add_test(function test_emptyPassword() {
|
|||
url = url.mutate().setPassword("ppppppppppp").finalize();
|
||||
Assert.equal(url.spec, "http://z:ppppppppppp@example.com/");
|
||||
|
||||
url = stringToURL("http://example.com");
|
||||
url = url.mutate().setUsername("").finalize(); // Should clear password too
|
||||
Assert.equal(url.spec, "http://example.com/");
|
||||
url = url.mutate().setPassword("").finalize(); // Still empty. Should work.
|
||||
Assert.equal(url.spec, "http://example.com/");
|
||||
|
||||
run_next_test();
|
||||
});
|
||||
|
||||
add_test(function test_emptyUser() {
|
||||
let url = stringToURL("http://:a@example.com/path/to/something?query#hash");
|
||||
Assert.equal(url.spec, "http://:a@example.com/path/to/something?query#hash");
|
||||
url = stringToURL("http://:@example.com/path/to/something?query#hash");
|
||||
Assert.equal(url.spec, "http://example.com/path/to/something?query#hash");
|
||||
|
||||
const kurl = stringToURL("http://user:pass@example.com:8888/path/to/something?query#hash");
|
||||
url = kurl.mutate().setUsername("").finalize();
|
||||
Assert.equal(url.spec, "http://:pass@example.com:8888/path/to/something?query#hash");
|
||||
Assert.equal(url.host, "example.com");
|
||||
Assert.equal(url.hostPort, "example.com:8888");
|
||||
Assert.equal(url.filePath, "/path/to/something");
|
||||
Assert.equal(url.query, "query");
|
||||
Assert.equal(url.ref, "hash");
|
||||
url = kurl.mutate().setUserPass(":pass1").finalize();
|
||||
Assert.equal(url.spec, "http://:pass1@example.com:8888/path/to/something?query#hash");
|
||||
Assert.equal(url.host, "example.com");
|
||||
Assert.equal(url.hostPort, "example.com:8888");
|
||||
Assert.equal(url.filePath, "/path/to/something");
|
||||
Assert.equal(url.query, "query");
|
||||
Assert.equal(url.ref, "hash");
|
||||
url = url.mutate().setUsername("user2").finalize();
|
||||
Assert.equal(url.spec, "http://user2:pass1@example.com:8888/path/to/something?query#hash");
|
||||
Assert.equal(url.host, "example.com");
|
||||
url = url.mutate().setUserPass(":pass234").finalize();
|
||||
Assert.equal(url.spec, "http://:pass234@example.com:8888/path/to/something?query#hash");
|
||||
Assert.equal(url.host, "example.com");
|
||||
url = url.mutate().setUserPass("").finalize();
|
||||
Assert.equal(url.spec, "http://example.com:8888/path/to/something?query#hash");
|
||||
Assert.equal(url.host, "example.com");
|
||||
url = url.mutate().setPassword("pa").finalize();
|
||||
Assert.equal(url.spec, "http://:pa@example.com:8888/path/to/something?query#hash");
|
||||
Assert.equal(url.host, "example.com");
|
||||
url = url.mutate().setUserPass("user:pass").finalize();
|
||||
symmetricEquality(true, url.QueryInterface(Ci.nsIURL), kurl);
|
||||
|
||||
url = stringToURL("http://example.com:8888/path/to/something?query#hash");
|
||||
url = url.mutate().setPassword("pass").finalize();
|
||||
Assert.equal(url.spec, "http://:pass@example.com:8888/path/to/something?query#hash");
|
||||
url = url.mutate().setUsername("").finalize();
|
||||
Assert.equal(url.spec, "http://:pass@example.com:8888/path/to/something?query#hash");
|
||||
|
||||
url = stringToURL("http://example.com:8888");
|
||||
url = url.mutate().setUsername("user").finalize();
|
||||
url = url.mutate().setUsername("").finalize();
|
||||
Assert.equal(url.spec, "http://example.com:8888/");
|
||||
|
||||
url = stringToURL("http://:pass@example.com");
|
||||
Assert.equal(url.spec, "http://:pass@example.com/");
|
||||
url = url.mutate().setPassword("").finalize();
|
||||
Assert.equal(url.spec, "http://example.com/");
|
||||
url = url.mutate().setUserPass("user:pass").finalize();
|
||||
Assert.equal(url.spec, "http://user:pass@example.com/");
|
||||
Assert.equal(url.host, "example.com");
|
||||
url = url.mutate().setUserPass("u:p").finalize();
|
||||
Assert.equal(url.spec, "http://u:p@example.com/");
|
||||
Assert.equal(url.host, "example.com");
|
||||
url = url.mutate().setUserPass("u1:p23").finalize();
|
||||
Assert.equal(url.spec, "http://u1:p23@example.com/");
|
||||
Assert.equal(url.host, "example.com");
|
||||
url = url.mutate().setUsername("u").finalize();
|
||||
Assert.equal(url.spec, "http://u:p23@example.com/");
|
||||
Assert.equal(url.host, "example.com");
|
||||
url = url.mutate().setPassword("p").finalize();
|
||||
Assert.equal(url.spec, "http://u:p@example.com/");
|
||||
Assert.equal(url.host, "example.com");
|
||||
|
||||
url = url.mutate().setUserPass("u2:p2").finalize();
|
||||
Assert.equal(url.spec, "http://u2:p2@example.com/");
|
||||
Assert.equal(url.host, "example.com");
|
||||
url = url.mutate().setUserPass("u23:p23").finalize();
|
||||
Assert.equal(url.spec, "http://u23:p23@example.com/");
|
||||
Assert.equal(url.host, "example.com");
|
||||
|
||||
run_next_test();
|
||||
});
|
||||
|
||||
registerCleanupFunction(function () {
|
||||
gPrefs.clearUserPref("network.standard-url.punycode-host");
|
||||
});
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
[redirect-userinfo.htm]
|
||||
[Allow redirect without userinfo (:@ is trimmed during URL parsing)]
|
||||
expected: FAIL
|
||||
|
|
@ -1,4 +1,10 @@
|
|||
[a-element-origin-xhtml.xhtml]
|
||||
[Parsing origin: <https://:@test> against <about:blank>]
|
||||
expected: FAIL
|
||||
|
||||
[Parsing origin: <http://::@c@d:2> against <http://example.org/foo/bar>]
|
||||
expected: FAIL
|
||||
|
||||
[Parsing origin: <gopher:/example.com/> against <http://example.org/foo/bar>]
|
||||
expected: FAIL
|
||||
|
||||
|
@ -35,6 +41,15 @@
|
|||
[Parsing origin: <http::b@www.example.com> against <about:blank>]
|
||||
expected: FAIL
|
||||
|
||||
[Parsing origin: <http:/:b@www.example.com> against <about:blank>]
|
||||
expected: FAIL
|
||||
|
||||
[Parsing origin: <http://:b@www.example.com> against <about:blank>]
|
||||
expected: FAIL
|
||||
|
||||
[Parsing origin: <http://:@www.example.com> against <about:blank>]
|
||||
expected: FAIL
|
||||
|
||||
[Parsing origin: <i> against <sc:/pa/pa>]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,4 +1,10 @@
|
|||
[a-element-origin.html]
|
||||
[Parsing origin: <https://:@test> against <about:blank>]
|
||||
expected: FAIL
|
||||
|
||||
[Parsing origin: <http://::@c@d:2> against <http://example.org/foo/bar>]
|
||||
expected: FAIL
|
||||
|
||||
[Parsing origin: <gopher:/example.com/> against <http://example.org/foo/bar>]
|
||||
expected: FAIL
|
||||
|
||||
|
@ -35,6 +41,15 @@
|
|||
[Parsing origin: <http::b@www.example.com> against <about:blank>]
|
||||
expected: FAIL
|
||||
|
||||
[Parsing origin: <http:/:b@www.example.com> against <about:blank>]
|
||||
expected: FAIL
|
||||
|
||||
[Parsing origin: <http://:b@www.example.com> against <about:blank>]
|
||||
expected: FAIL
|
||||
|
||||
[Parsing origin: <http://:@www.example.com> against <about:blank>]
|
||||
expected: FAIL
|
||||
|
||||
[Parsing origin: <i> against <sc:/pa/pa>]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -17,6 +17,9 @@
|
|||
[Parsing: <http::@c:29> against <http://example.org/foo/bar>]
|
||||
expected: FAIL
|
||||
|
||||
[Parsing: <http://::@c@d:2> against <http://example.org/foo/bar>]
|
||||
expected: FAIL
|
||||
|
||||
[Parsing: <http://foo.com:b@d/> against <http://example.org/foo/bar>]
|
||||
expected: FAIL
|
||||
|
||||
|
@ -173,6 +176,12 @@
|
|||
[Parsing: <http::b@www.example.com> against <about:blank>]
|
||||
expected: FAIL
|
||||
|
||||
[Parsing: <http:/:b@www.example.com> against <about:blank>]
|
||||
expected: FAIL
|
||||
|
||||
[Parsing: <http://:b@www.example.com> against <about:blank>]
|
||||
expected: FAIL
|
||||
|
||||
[Parsing: <http:/:@/www.example.com> against <about:blank>]
|
||||
expected: FAIL
|
||||
|
||||
|
@ -215,6 +224,9 @@
|
|||
[Parsing: <http://@:www.example.com> against <about:blank>]
|
||||
expected: FAIL
|
||||
|
||||
[Parsing: <http://:@www.example.com> against <about:blank>]
|
||||
expected: FAIL
|
||||
|
||||
[Parsing: <file:..> against <http://www.example.com/test>]
|
||||
expected: FAIL
|
||||
|
||||
|
@ -392,6 +404,9 @@
|
|||
[Parsing: <tel:1234567890> against <http://example.org/foo/bar>]
|
||||
expected: FAIL
|
||||
|
||||
[Parsing: <https://:@test> against <about:blank>]
|
||||
expected: FAIL
|
||||
|
||||
[Parsing: <non-special://test:@test/x> against <about:blank>]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -17,6 +17,9 @@
|
|||
[Parsing: <http::@c:29> against <http://example.org/foo/bar>]
|
||||
expected: FAIL
|
||||
|
||||
[Parsing: <http://::@c@d:2> against <http://example.org/foo/bar>]
|
||||
expected: FAIL
|
||||
|
||||
[Parsing: <http://foo.com:b@d/> against <http://example.org/foo/bar>]
|
||||
expected: FAIL
|
||||
|
||||
|
@ -173,6 +176,12 @@
|
|||
[Parsing: <http::b@www.example.com> against <about:blank>]
|
||||
expected: FAIL
|
||||
|
||||
[Parsing: <http:/:b@www.example.com> against <about:blank>]
|
||||
expected: FAIL
|
||||
|
||||
[Parsing: <http://:b@www.example.com> against <about:blank>]
|
||||
expected: FAIL
|
||||
|
||||
[Parsing: <http:/:@/www.example.com> against <about:blank>]
|
||||
expected: FAIL
|
||||
|
||||
|
@ -215,6 +224,9 @@
|
|||
[Parsing: <http://@:www.example.com> against <about:blank>]
|
||||
expected: FAIL
|
||||
|
||||
[Parsing: <http://:@www.example.com> against <about:blank>]
|
||||
expected: FAIL
|
||||
|
||||
[Parsing: <http://example example.com> against <http://other.com/>]
|
||||
expected: FAIL
|
||||
|
||||
|
@ -401,6 +413,9 @@
|
|||
[Parsing: <tel:1234567890> against <http://example.org/foo/bar>]
|
||||
expected: FAIL
|
||||
|
||||
[Parsing: <https://:@test> against <about:blank>]
|
||||
expected: FAIL
|
||||
|
||||
[Parsing: <non-special://test:@test/x> against <about:blank>]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -5,6 +5,9 @@
|
|||
[Parsing: <http::@c:29> against <http://example.org/foo/bar>]
|
||||
expected: FAIL
|
||||
|
||||
[Parsing: <http://::@c@d:2> against <http://example.org/foo/bar>]
|
||||
expected: FAIL
|
||||
|
||||
[Parsing: <http://foo.com:b@d/> against <http://example.org/foo/bar>]
|
||||
expected: FAIL
|
||||
|
||||
|
@ -80,9 +83,18 @@
|
|||
[Parsing: <http::b@www.example.com> against <about:blank>]
|
||||
expected: FAIL
|
||||
|
||||
[Parsing: <http:/:b@www.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
|
||||
|
||||
[Parsing: <http://:@www.example.com> against <about:blank>]
|
||||
expected: FAIL
|
||||
|
||||
[Parsing: <http://zyx.com> against <http://other.com/>]
|
||||
expected: FAIL
|
||||
|
||||
|
@ -176,6 +188,9 @@
|
|||
[Parsing: <file:..> against <http://www.example.com/test>]
|
||||
expected: FAIL
|
||||
|
||||
[Parsing: <https://:@test> against <about:blank>]
|
||||
expected: FAIL
|
||||
|
||||
[Parsing: <non-special://test:@test/x> against <about:blank>]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,4 +1,10 @@
|
|||
[url-origin.html]
|
||||
[Origin parsing: <https://:@test> against <about:blank>]
|
||||
expected: FAIL
|
||||
|
||||
[Origin parsing: <http://::@c@d:2> against <http://example.org/foo/bar>]
|
||||
expected: FAIL
|
||||
|
||||
[Origin parsing: <gopher:/example.com/> against <http://example.org/foo/bar>]
|
||||
expected: FAIL
|
||||
|
||||
|
@ -35,6 +41,15 @@
|
|||
[Origin parsing: <http::b@www.example.com> against <about:blank>]
|
||||
expected: FAIL
|
||||
|
||||
[Origin parsing: <http:/:b@www.example.com> against <about:blank>]
|
||||
expected: FAIL
|
||||
|
||||
[Origin parsing: <http://:b@www.example.com> against <about:blank>]
|
||||
expected: FAIL
|
||||
|
||||
[Origin parsing: <http://:@www.example.com> against <about:blank>]
|
||||
expected: FAIL
|
||||
|
||||
[Origin parsing: <i> against <sc:/pa/pa>]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -35,12 +35,27 @@
|
|||
[Setting <ssh://me@example.net>.protocol = 'http' Can’t switch from non-special scheme to special. Note: this may change, see https://github.com/whatwg/url/issues/104]
|
||||
expected: FAIL
|
||||
|
||||
[Setting <http://:secret@example.net>.username = 'me']
|
||||
expected: FAIL
|
||||
|
||||
[Setting <http://me:secret@example.net>.username = '']
|
||||
expected: FAIL
|
||||
|
||||
[Setting <http://example.net>.username = '\x00\x01\t\n\r\x1f !"#$%&'()*+,-./09:;<=>?@AZ[\\\]^_`az{|}~Éé' UTF-8 percent encoding with the userinfo encode set.]
|
||||
expected: FAIL
|
||||
|
||||
[Setting <http://example.net>.password = 'secret']
|
||||
expected: FAIL
|
||||
|
||||
[Setting <http://:secret@example.net>.password = '']
|
||||
expected: FAIL
|
||||
|
||||
[Setting <http://example.net>.password = '\x00\x01\t\n\r\x1f !"#$%&'()*+,-./09:;<=>?@AZ[\\\]^_`az{|}~Éé' UTF-8 percent encoding with the userinfo encode set.]
|
||||
expected: FAIL
|
||||
|
||||
[Setting <http://example.net>.password = '%c3%89té' Bytes already percent-encoded are left as-is.]
|
||||
expected: FAIL
|
||||
|
||||
[Setting <view-source+http://example.net/foo>.host = '' The empty host is OK for non-special schemes]
|
||||
expected: FAIL
|
||||
|
||||
|
@ -131,6 +146,24 @@
|
|||
[<area>: Setting <ssh://me@example.net>.protocol = 'http' Can’t switch from non-special scheme to special. Note: this may change, see https://github.com/whatwg/url/issues/104]
|
||||
expected: FAIL
|
||||
|
||||
[URL: Setting <http://:secret@example.net>.username = 'me']
|
||||
expected: FAIL
|
||||
|
||||
[<a>: Setting <http://:secret@example.net>.username = 'me']
|
||||
expected: FAIL
|
||||
|
||||
[<area>: Setting <http://:secret@example.net>.username = 'me']
|
||||
expected: FAIL
|
||||
|
||||
[URL: Setting <http://me:secret@example.net>.username = '']
|
||||
expected: FAIL
|
||||
|
||||
[<a>: Setting <http://me:secret@example.net>.username = '']
|
||||
expected: FAIL
|
||||
|
||||
[<area>: Setting <http://me:secret@example.net>.username = '']
|
||||
expected: FAIL
|
||||
|
||||
[URL: Setting <http://example.net>.username = '\x00\x01\t\n\r\x1f !"#$%&'()*+,-./09:;<=>?@AZ[\\\]^_`az{|}~Éé' UTF-8 percent encoding with the userinfo encode set.]
|
||||
expected: FAIL
|
||||
|
||||
|
@ -140,6 +173,24 @@
|
|||
[<area>: Setting <http://example.net>.username = '\x00\x01\t\n\r\x1f !"#$%&'()*+,-./09:;<=>?@AZ[\\\]^_`az{|}~Éé' UTF-8 percent encoding with the userinfo encode set.]
|
||||
expected: FAIL
|
||||
|
||||
[URL: Setting <http://example.net>.password = 'secret']
|
||||
expected: FAIL
|
||||
|
||||
[<a>: Setting <http://example.net>.password = 'secret']
|
||||
expected: FAIL
|
||||
|
||||
[<area>: Setting <http://example.net>.password = 'secret']
|
||||
expected: FAIL
|
||||
|
||||
[URL: Setting <http://:secret@example.net>.password = '']
|
||||
expected: FAIL
|
||||
|
||||
[<a>: Setting <http://:secret@example.net>.password = '']
|
||||
expected: FAIL
|
||||
|
||||
[<area>: Setting <http://:secret@example.net>.password = '']
|
||||
expected: FAIL
|
||||
|
||||
[URL: Setting <http://example.net>.password = '\x00\x01\t\n\r\x1f !"#$%&'()*+,-./09:;<=>?@AZ[\\\]^_`az{|}~Éé' UTF-8 percent encoding with the userinfo encode set.]
|
||||
expected: FAIL
|
||||
|
||||
|
@ -149,6 +200,15 @@
|
|||
[<area>: Setting <http://example.net>.password = '\x00\x01\t\n\r\x1f !"#$%&'()*+,-./09:;<=>?@AZ[\\\]^_`az{|}~Éé' UTF-8 percent encoding with the userinfo encode set.]
|
||||
expected: FAIL
|
||||
|
||||
[URL: Setting <http://example.net>.password = '%c3%89té' Bytes already percent-encoded are left as-is.]
|
||||
expected: FAIL
|
||||
|
||||
[<a>: Setting <http://example.net>.password = '%c3%89té' Bytes already percent-encoded are left as-is.]
|
||||
expected: FAIL
|
||||
|
||||
[<area>: Setting <http://example.net>.password = '%c3%89té' Bytes already percent-encoded are left as-is.]
|
||||
expected: FAIL
|
||||
|
||||
[URL: Setting <view-source+http://example.net/foo>.host = '' The empty host is OK for non-special schemes]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -4,3 +4,10 @@
|
|||
|
||||
[XMLHttpRequest: send() - "Basic" authenticated requests with competing user name/password options user name and password in URL userinfo, only user name in open() call: user name in open() wins]
|
||||
expected: FAIL
|
||||
|
||||
[XMLHttpRequest user/pass options: pass in URL, user in open()]
|
||||
expected: FAIL
|
||||
|
||||
[XMLHttpRequest user/pass options: pass in URL, user/pass in open()]
|
||||
expected: FAIL
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче