зеркало из https://github.com/mozilla/pjs.git
fixes bug 201986 "infinite network loop when auth realm changes" r=dougt sr=alecf
This commit is contained in:
Родитель
9be6fbcea0
Коммит
0ec9d44ddc
|
@ -1806,8 +1806,11 @@ nsHttpChannel::GetCredentials(const char *challenges,
|
||||||
|
|
||||||
// proxy auth's never in prehost. only take user:pass from URL if this
|
// proxy auth's never in prehost. only take user:pass from URL if this
|
||||||
// is the first 401 response (mIdent holds previously attempted identity).
|
// is the first 401 response (mIdent holds previously attempted identity).
|
||||||
if (!proxyAuth && mIdent.IsEmpty())
|
PRBool identFromURI = PR_FALSE;
|
||||||
|
if (!proxyAuth && mIdent.IsEmpty()) {
|
||||||
GetIdentityFromURI(authFlags, mIdent);
|
GetIdentityFromURI(authFlags, mIdent);
|
||||||
|
identFromURI = !mIdent.IsEmpty();
|
||||||
|
}
|
||||||
|
|
||||||
const char *host;
|
const char *host;
|
||||||
PRInt32 port;
|
PRInt32 port;
|
||||||
|
@ -1875,6 +1878,11 @@ nsHttpChannel::GetCredentials(const char *challenges,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (!identFromURI) {
|
||||||
|
// hmm... identity invalid, but no auth entry! the realm probably
|
||||||
|
// changed (see bug 201986).
|
||||||
|
ident->Clear();
|
||||||
|
}
|
||||||
|
|
||||||
if (!entry && ident->IsEmpty()) {
|
if (!entry && ident->IsEmpty()) {
|
||||||
// at this point we are forced to interact with the user to get their
|
// at this point we are forced to interact with the user to get their
|
||||||
|
|
Загрузка…
Ссылка в новой задаче