Bug 1382010 - Use SASL mechanisms PLAIN and LOGIN, as defined in RFC 4422, in uppercase letters. r=jorgk
authorAlfred Peters <infofrommozilla@justmail.de>
Thu, 20 Jul 2017 08:33:00 +0200
changeset 28465 11d720ef6082a332b4eb5905d73ae84caa65b418
parent 28464 0406339439ffb98b60c17f41a1529fc1f8fb5073
child 28466 6ee3e1eace93976a801cb07e266da6160e0dd5e8
push id1986
push userclokep@gmail.com
push dateWed, 02 Aug 2017 14:43:31 +0000
treeherdercomm-beta@b51c9adf2c9e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjorgk
bugs1382010
Bug 1382010 - Use SASL mechanisms PLAIN and LOGIN, as defined in RFC 4422, in uppercase letters. r=jorgk
mailnews/imap/src/nsImapProtocol.cpp
--- a/mailnews/imap/src/nsImapProtocol.cpp
+++ b/mailnews/imap/src/nsImapProtocol.cpp
@@ -5923,17 +5923,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
@@ -5950,17 +5950,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);