mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-05 16:46:26 +00:00
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:
parent
9cfabaaec8
commit
e8fd89376b
@ -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 */);
|
||||
|
Loading…
Reference in New Issue
Block a user