Bug #13029 --> clear the password if it is a bogus password

This commit is contained in:
mscott%netscape.com 1999-09-08 18:47:48 +00:00
Родитель 5b653fa8fc
Коммит c9c14b044d
1 изменённых файлов: 10 добавлений и 11 удалений

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

@ -4639,7 +4639,7 @@ PRBool nsImapProtocol::MailboxIsNoSelectMailbox(const char *mailboxName)
if (!name) if (!name)
return PR_FALSE; return PR_FALSE;
m_imapServerSink->FolderIsNoSelect(name, &rv); m_imapServerSink->FolderIsNoSelect(name, &rv);
PL_strfree(name); PL_strfree(name);
return rv; return rv;
@ -5878,23 +5878,22 @@ PRBool nsImapProtocol::TryToLogon()
InsecureLogin(userName, password); InsecureLogin(userName, password);
if (!GetServerStateParser().LastCommandSuccessful()) if (!GetServerStateParser().LastCommandSuccessful())
{ {
// login failed! // login failed!
// if we failed because of an interrupt, then do not bother the user // if we failed because of an interrupt, then do not bother the user
if (!DeathSignalReceived()) if (!DeathSignalReceived())
{ {
AlertUserEventUsingId(IMAP_LOGIN_FAILED); AlertUserEventUsingId(IMAP_LOGIN_FAILED);
// if we did get a password then remember so we don't have to prompt m_server->SetPassword(""); // clear out the password
// the user for it again m_hostSessionList->SetPasswordForHost(GetImapHostName(),
m_hostSessionList->SetPasswordForHost(GetImapHostName(),
GetImapUserName(), nsnull); GetImapUserName(), nsnull);
PR_FREEIF(password); PR_FREEIF(password);
m_currentBiffState = nsMsgBiffState_Unknown; m_currentBiffState = nsMsgBiffState_Unknown;
SendSetBiffIndicatorEvent(m_currentBiffState); SendSetBiffIndicatorEvent(m_currentBiffState);
} // if we didn't receive the death signal... } // if we didn't receive the death signal...
} // if login failed } // if login failed
else // login succeeded else // login succeeded
{ {
rv = m_hostSessionList->SetPasswordForHost(GetImapHostName(), rv = m_hostSessionList->SetPasswordForHost(GetImapHostName(),
GetImapUserName(), password); GetImapUserName(), password);
rv = m_hostSessionList->GetPasswordVerifiedOnline(GetImapHostName(), GetImapUserName(), imapPasswordIsNew); rv = m_hostSessionList->GetPasswordVerifiedOnline(GetImapHostName(), GetImapUserName(), imapPasswordIsNew);