Bug 1174159, NTLMv2 authentication fails in SMTP, r=neil, a=rkent
authorR Kent James <rkent@caspia.com>
Sat, 20 Jun 2015 10:13:36 -0700
changeset 26073 a62f8a4e3c1ebe51da978db6f98f209d278f418d
parent 26072 c71474e60124b75e5c4b811bcd837d9e5077f4e6
child 26074 839e5b1bcdb6b4daf16f180e6da8e6417f4c102f
push id1850
push userclokep@gmail.com
push dateWed, 08 Mar 2017 19:29:12 +0000
treeherdercomm-esr52@028df196b2d9 [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
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);