Bug 1174159, NTLMv2 authentication fails in SMTP, r=neil, a=rkent SEAMONKEY_2_35_RELEASE_BRANCH
authorR Kent James <rkent@caspia.com>
Sat, 20 Jun 2015 10:13:36 -0700
branchSEAMONKEY_2_35_RELEASE_BRANCH
changeset 31183 c8490761484d7ccf9c0aa86d2f1daa555be6b3b4
parent 31182 dda9863a023deadcb2c4b8336d1f55933312692d
child 31184 0b3c0bc49ac94a6b55f7e760dd6f8711e6d1124a
push id1
push userclokep@gmail.com
push dateMon, 07 May 2018 22:45:56 +0000
treeherdercomm-esr60@57eacde5ef40 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersneil, rkent
bugs1174159
Bug 1174159, NTLMv2 authentication fails in SMTP, r=neil, a=rkent a=IanN for uplift to comm-release+SEAMONKEY_2_35_RELEASE_BRANCH CLOSED TREE
mailnews/compose/src/nsSmtpProtocol.cpp
--- a/mailnews/compose/src/nsSmtpProtocol.cpp
+++ b/mailnews/compose/src/nsSmtpProtocol.cpp
@@ -1430,17 +1430,17 @@ nsresult nsSmtpProtocol::AuthLoginStep2(
         PR_snprintf(buffer, sizeof(buffer), "*" CRLF);
     }
     else if (m_currentAuthMethod == SMTP_AUTH_NTLM_ENABLED ||
              m_currentAuthMethod == SMTP_AUTH_MSN_ENABLED)
     {
       PR_LOG(SMTPLogModule, PR_LOG_DEBUG, ("NTLM/MSN auth, step 2"));
       nsAutoCString response;
       rv = DoNtlmStep2(m_responseText, response);
-      PR_snprintf(buffer, sizeof(buffer), "%.256s" CRLF, response.get());
+      PR_snprintf(buffer, sizeof(buffer), "%.509s" CRLF, response.get());
     }
     else if (m_currentAuthMethod == SMTP_AUTH_PLAIN_ENABLED ||
              m_currentAuthMethod == SMTP_AUTH_LOGIN_ENABLED)
     {
       PR_LOG(SMTPLogModule, PR_LOG_DEBUG, ("PLAIN/LOGIN auth, step 2"));
       char *base64Str = PL_Base64Encode(password.get(), password.Length(), nullptr);
       PR_snprintf(buffer, sizeof(buffer), "%.256s" CRLF, base64Str);
       NS_Free(base64Str);