Bug 1382010 - Use SASL mechanisms PLAIN and LOGIN, as defined in RFC 4422, in uppercase letters. r=jorgk a=jorgk
authorAlfred Peters <infofrommozilla@justmail.de>
Thu, 20 Jul 2017 08:33:00 +0200
changeset 27962 079b221a884b99f2f939c2aeeaf7fc37231b67fc
parent 27961 6734173578a64d81d69f08ec390916616a3a7828
child 27963 75c0ad02a496e2c1d1277ed5447703e981f63fa1
push id1928
push usermozilla@jorgk.com
push dateFri, 28 Jul 2017 09:37:11 +0000
treeherdercomm-esr52@569d95e53a4c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjorgk, jorgk
bugs1382010
Bug 1382010 - Use SASL mechanisms PLAIN and LOGIN, as defined in RFC 4422, in uppercase letters. r=jorgk a=jorgk
mailnews/imap/src/nsImapProtocol.cpp
--- 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);