regression in removing invalid passwords from password manager

bug 127863 r=morse sr=darin a=asa
This commit is contained in:
badami%netscape.com 2002-03-11 13:25:25 +00:00
Родитель ba2410c1c7
Коммит 1bd183664a
1 изменённых файлов: 14 добавлений и 10 удалений

Просмотреть файл

@ -1644,18 +1644,12 @@ nsHttpChannel::PromptForUserPass(const char *host,
}
// construct the domain string
// we always add the port to domain since it is used
// as the key for storing in password maanger.
nsCAutoString domain;
domain.Assign(host);
// Add port only if it was originally specified in the URI
PRInt32 uriPort = -1;
mURI->GetPort(&uriPort);
if (uriPort != -1) {
domain.Append(':');
domain.AppendInt(port);
}
NS_ConvertASCIItoUCS2 hostU(domain);
domain.Append(" (");
domain.Append(realm);
domain.Append(')');
@ -1670,6 +1664,16 @@ nsHttpChannel::PromptForUserPass(const char *host,
if (NS_FAILED(rv)) return rv;
// figure out what message to display...
nsCAutoString displayHost;
displayHost.Assign(host);
// Add port only if it was originally specified in the URI
PRInt32 uriPort = -1;
mURI->GetPort(&uriPort);
if (uriPort != -1) {
displayHost.Append(':');
displayHost.AppendInt(port);
}
NS_ConvertASCIItoUCS2 hostU(displayHost);
nsXPIDLString message;
if (proxyAuth) {
const PRUnichar *strings[] = { hostU.get() };