Bug 1382010 - Use SASL mechanisms PLAIN and LOGIN, as defined in RFC 4422, in uppercase letters. r=jorgk a=jorgk
--- a/mailnews/imap/src/nsImapProtocol.cpp
+++ b/mailnews/imap/src/nsImapProtocol.cpp
@@ -5790,17 +5790,17 @@ nsresult nsImapProtocol::AuthLogin(const
rv = SendData(response.get());
ParseIMAPandCheckForNewMail(command.get());
}
}
}
else if (flag & kHasAuthPlainCapability)
{
MOZ_LOG(IMAP, LogLevel::Debug, ("PLAIN auth"));
- PR_snprintf(m_dataOutputBuf, OUTPUT_BUFFER_SIZE, "%s authenticate plain" CRLF, GetServerCommandTag());
+ PR_snprintf(m_dataOutputBuf, OUTPUT_BUFFER_SIZE, "%s authenticate PLAIN" CRLF, GetServerCommandTag());
rv = SendData(m_dataOutputBuf);
NS_ENSURE_SUCCESS(rv, rv);
currentCommand = PL_strdup(m_dataOutputBuf); /* StrAllocCopy(currentCommand, GetOutputBuffer()); */
ParseIMAPandCheckForNewMail();
if (GetServerStateParser().LastCommandSuccessful())
{
// RFC 4616
char plainstr[512]; // placeholder for "<NUL>userName<NUL>password" TODO nsAutoCString
@@ -5817,17 +5817,17 @@ nsresult nsImapProtocol::AuthLogin(const
rv = SendData(m_dataOutputBuf, true /* suppress logging */);
if (NS_SUCCEEDED(rv))
ParseIMAPandCheckForNewMail(currentCommand);
} // if the last command succeeded
} // if auth plain capability
else if (flag & kHasAuthLoginCapability)
{
MOZ_LOG(IMAP, LogLevel::Debug, ("LOGIN auth"));
- PR_snprintf(m_dataOutputBuf, OUTPUT_BUFFER_SIZE, "%s authenticate login" CRLF, GetServerCommandTag());
+ PR_snprintf(m_dataOutputBuf, OUTPUT_BUFFER_SIZE, "%s authenticate LOGIN" CRLF, GetServerCommandTag());
rv = SendData(m_dataOutputBuf);
NS_ENSURE_SUCCESS(rv, rv);
currentCommand = PL_strdup(m_dataOutputBuf);
ParseIMAPandCheckForNewMail();
if (GetServerStateParser().LastCommandSuccessful())
{
char *base64Str = PL_Base64Encode(userName, PL_strlen(userName), nullptr);