fix for #59231. sr=mscott. if we use insecure login and the password

contain a "\", we'll fail.  the fix is to send "\\" for every "\".
This commit is contained in:
sspitzer%netscape.com 2000-11-10 05:27:44 +00:00
parent 9cfabaaec8
commit e8fd89376b

View File

@ -4319,7 +4319,14 @@ void nsImapProtocol::InsecureLogin(const char *userName, const char *password)
command.Append(" login \"");
command.Append(userName);
command.Append("\" \"");
command.Append(password);
// if the password contains a \, login will fail
// turn foo\bar into foo\\bar
nsCString correctedPassword;
correctedPassword = password;
correctedPassword.ReplaceSubstring("\\","\\\\");
command.Append((const char *)correctedPassword);
command.Append("\""CRLF);
nsresult rv = SendData(command.GetBuffer(), PR_TRUE /* supress logging */);