зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
9cfabaaec8
Коммит
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 */);
|
||||
|
|
Загрузка…
Ссылка в новой задаче