From aecd37a164dc69823ffb615b536a03052b6d94de Mon Sep 17 00:00:00 2001 From: "mscott%netscape.com" Date: Wed, 8 Sep 1999 18:47:48 +0000 Subject: [PATCH] Bug #13029 --> clear the password if it is a bogus password git-svn-id: svn://10.0.0.236/trunk@46359 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/mailnews/imap/src/nsImapProtocol.cpp | 21 ++++++++++---------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/mozilla/mailnews/imap/src/nsImapProtocol.cpp b/mozilla/mailnews/imap/src/nsImapProtocol.cpp index 81b901b10a2..5b80b05c00c 100644 --- a/mozilla/mailnews/imap/src/nsImapProtocol.cpp +++ b/mozilla/mailnews/imap/src/nsImapProtocol.cpp @@ -4639,7 +4639,7 @@ PRBool nsImapProtocol::MailboxIsNoSelectMailbox(const char *mailboxName) if (!name) return PR_FALSE; - m_imapServerSink->FolderIsNoSelect(name, &rv); + m_imapServerSink->FolderIsNoSelect(name, &rv); PL_strfree(name); return rv; @@ -5878,23 +5878,22 @@ PRBool nsImapProtocol::TryToLogon() InsecureLogin(userName, password); if (!GetServerStateParser().LastCommandSuccessful()) - { + { // login failed! // if we failed because of an interrupt, then do not bother the user if (!DeathSignalReceived()) { - AlertUserEventUsingId(IMAP_LOGIN_FAILED); - // if we did get a password then remember so we don't have to prompt - // the user for it again - m_hostSessionList->SetPasswordForHost(GetImapHostName(), + AlertUserEventUsingId(IMAP_LOGIN_FAILED); + m_server->SetPassword(""); // clear out the password + m_hostSessionList->SetPasswordForHost(GetImapHostName(), GetImapUserName(), nsnull); - PR_FREEIF(password); + PR_FREEIF(password); m_currentBiffState = nsMsgBiffState_Unknown; SendSetBiffIndicatorEvent(m_currentBiffState); - } // if we didn't receive the death signal... - } // if login failed - else // login succeeded - { + } // if we didn't receive the death signal... + } // if login failed + else // login succeeded + { rv = m_hostSessionList->SetPasswordForHost(GetImapHostName(), GetImapUserName(), password); rv = m_hostSessionList->GetPasswordVerifiedOnline(GetImapHostName(), GetImapUserName(), imapPasswordIsNew);