Loading RELEASE-NOTES +1 −3 Original line number Original line Diff line number Diff line Loading @@ -10,9 +10,7 @@ Curl and libcurl 7.33.1 This release includes the following changes: This release includes the following changes: o SSL: protocol version can be specified more precisely [1] o SSL: protocol version can be specified more precisely [1] o email: Added support for cancelling NTLM authentication o imap/pop3/smtp: Added graceful cancellation of SASL authentication o email: Added support for cancelling DIGEST-MD5 authentication o email: Added support for canceling CRAM-MD5 authentication o Add "Happy Eyeballs" for IPv4/IPv6 dual connect attempts o Add "Happy Eyeballs" for IPv4/IPv6 dual connect attempts This release includes the following bugfixes: This release includes the following bugfixes: Loading lib/curl_sasl.c +6 −7 Original line number Original line Diff line number Diff line Loading @@ -559,14 +559,14 @@ CURLcode Curl_sasl_create_ntlm_type3_message(struct SessionHandle *data, /* /* * Curl_sasl_create_xoauth2_message() * Curl_sasl_create_xoauth2_message() * * * This is used to generate an already encoded XOAUTH2 message ready * This is used to generate an already encoded OAuth 2.0 message ready for * for sending to the recipient. * sending to the recipient. * * * Parameters: * Parameters: * * * data [in] - The session handle. * data [in] - The session handle. * user [in] - The user name. * user [in] - The user name. * bearer [in] - The XOAUTH Bearer token. * bearer [in] - The bearer token. * outptr [in/out] - The address where a pointer to newly allocated memory * outptr [in/out] - The address where a pointer to newly allocated memory * holding the result will be stored upon completion. * holding the result will be stored upon completion. * outlen [out] - The length of the output message. * outlen [out] - The length of the output message. Loading @@ -579,16 +579,15 @@ CURLcode Curl_sasl_create_xoauth2_message(struct SessionHandle *data, char **outptr, size_t *outlen) char **outptr, size_t *outlen) { { CURLcode result = CURLE_OK; CURLcode result = CURLE_OK; char *xoauth; char *xoauth = NULL; /* Generate the message */ xoauth = aprintf("user=%s\1auth=Bearer %s\1\1", user, bearer); xoauth = aprintf("user=%s\1auth=Bearer %s\1\1", user, bearer); if(!xoauth) if(!xoauth) return CURLE_OUT_OF_MEMORY; return CURLE_OUT_OF_MEMORY; /* Base64 encode the reply */ /* Base64 encode the reply */ result = Curl_base64_encode(data, xoauth, strlen(xoauth), outptr, result = Curl_base64_encode(data, xoauth, strlen(xoauth), outptr, outlen); outlen); Curl_safefree(xoauth); Curl_safefree(xoauth); Loading lib/imap.c +35 −50 Original line number Original line Diff line number Diff line Loading @@ -1007,19 +1007,16 @@ static CURLcode imap_state_auth_plain_resp(struct connectdata *conn, /* Create the authorisation message */ /* Create the authorisation message */ result = Curl_sasl_create_plain_message(data, conn->user, conn->passwd, result = Curl_sasl_create_plain_message(data, conn->user, conn->passwd, &plainauth, &len); &plainauth, &len); if(!result && plainauth) { /* Send the message */ /* Send the message */ if(!result) { if(plainauth) { result = Curl_pp_sendf(&conn->proto.imapc.pp, "%s", plainauth); result = Curl_pp_sendf(&conn->proto.imapc.pp, "%s", plainauth); if(!result) if(!result) state(conn, IMAP_AUTHENTICATE_FINAL); state(conn, IMAP_AUTHENTICATE_FINAL); } } } Curl_safefree(plainauth); Curl_safefree(plainauth); } } return result; return result; } } Loading @@ -1044,19 +1041,16 @@ static CURLcode imap_state_auth_login_resp(struct connectdata *conn, /* Create the user message */ /* Create the user message */ result = Curl_sasl_create_login_message(data, conn->user, result = Curl_sasl_create_login_message(data, conn->user, &authuser, &len); &authuser, &len); if(!result && authuser) { /* Send the user */ /* Send the user */ if(!result) { if(authuser) { result = Curl_pp_sendf(&conn->proto.imapc.pp, "%s", authuser); result = Curl_pp_sendf(&conn->proto.imapc.pp, "%s", authuser); if(!result) if(!result) state(conn, IMAP_AUTHENTICATE_LOGIN_PASSWD); state(conn, IMAP_AUTHENTICATE_LOGIN_PASSWD); } } } Curl_safefree(authuser); Curl_safefree(authuser); } } return result; return result; } } Loading @@ -1081,19 +1075,16 @@ static CURLcode imap_state_auth_login_password_resp(struct connectdata *conn, /* Create the password message */ /* Create the password message */ result = Curl_sasl_create_login_message(data, conn->passwd, result = Curl_sasl_create_login_message(data, conn->passwd, &authpasswd, &len); &authpasswd, &len); if(!result && authpasswd) { /* Send the password */ /* Send the password */ if(!result) { if(authpasswd) { result = Curl_pp_sendf(&conn->proto.imapc.pp, "%s", authpasswd); result = Curl_pp_sendf(&conn->proto.imapc.pp, "%s", authpasswd); if(!result) if(!result) state(conn, IMAP_AUTHENTICATE_FINAL); state(conn, IMAP_AUTHENTICATE_FINAL); } } } Curl_safefree(authpasswd); Curl_safefree(authpasswd); } } return result; return result; } } Loading Loading @@ -1252,19 +1243,16 @@ static CURLcode imap_state_auth_ntlm_resp(struct connectdata *conn, result = Curl_sasl_create_ntlm_type1_message(conn->user, conn->passwd, result = Curl_sasl_create_ntlm_type1_message(conn->user, conn->passwd, &conn->ntlm, &conn->ntlm, &type1msg, &len); &type1msg, &len); if(!result && type1msg) { /* Send the message */ /* Send the message */ if(!result) { if(type1msg) { result = Curl_pp_sendf(&conn->proto.imapc.pp, "%s", type1msg); result = Curl_pp_sendf(&conn->proto.imapc.pp, "%s", type1msg); if(!result) if(!result) state(conn, IMAP_AUTHENTICATE_NTLM_TYPE2MSG); state(conn, IMAP_AUTHENTICATE_NTLM_TYPE2MSG); } } } Curl_safefree(type1msg); Curl_safefree(type1msg); } } return result; return result; } } Loading Loading @@ -1341,19 +1329,16 @@ static CURLcode imap_state_auth_xoauth2_resp(struct connectdata *conn, result = Curl_sasl_create_xoauth2_message(conn->data, conn->user, result = Curl_sasl_create_xoauth2_message(conn->data, conn->user, conn->xoauth2_bearer, conn->xoauth2_bearer, &xoauth, &len); &xoauth, &len); if(!result && xoauth) { /* Send the message */ /* Send the message */ if(!result) { if(xoauth) { result = Curl_pp_sendf(&conn->proto.imapc.pp, "%s", xoauth); result = Curl_pp_sendf(&conn->proto.imapc.pp, "%s", xoauth); if(!result) if(!result) state(conn, IMAP_AUTHENTICATE_FINAL); state(conn, IMAP_AUTHENTICATE_FINAL); } } } Curl_safefree(xoauth); Curl_safefree(xoauth); } } return result; return result; } } Loading lib/pop3.c +35 −50 Original line number Original line Diff line number Diff line Loading @@ -865,19 +865,16 @@ static CURLcode pop3_state_auth_plain_resp(struct connectdata *conn, /* Create the authorisation message */ /* Create the authorisation message */ result = Curl_sasl_create_plain_message(data, conn->user, conn->passwd, result = Curl_sasl_create_plain_message(data, conn->user, conn->passwd, &plainauth, &len); &plainauth, &len); if(!result && plainauth) { /* Send the message */ /* Send the message */ if(!result) { if(plainauth) { result = Curl_pp_sendf(&conn->proto.pop3c.pp, "%s", plainauth); result = Curl_pp_sendf(&conn->proto.pop3c.pp, "%s", plainauth); if(!result) if(!result) state(conn, POP3_AUTH_FINAL); state(conn, POP3_AUTH_FINAL); } } } Curl_safefree(plainauth); Curl_safefree(plainauth); } } return result; return result; } } Loading @@ -902,19 +899,16 @@ static CURLcode pop3_state_auth_login_resp(struct connectdata *conn, /* Create the user message */ /* Create the user message */ result = Curl_sasl_create_login_message(data, conn->user, result = Curl_sasl_create_login_message(data, conn->user, &authuser, &len); &authuser, &len); if(!result && authuser) { /* Send the user */ /* Send the user */ if(!result) { if(authuser) { result = Curl_pp_sendf(&conn->proto.pop3c.pp, "%s", authuser); result = Curl_pp_sendf(&conn->proto.pop3c.pp, "%s", authuser); if(!result) if(!result) state(conn, POP3_AUTH_LOGIN_PASSWD); state(conn, POP3_AUTH_LOGIN_PASSWD); } } } Curl_safefree(authuser); Curl_safefree(authuser); } } return result; return result; } } Loading @@ -939,19 +933,16 @@ static CURLcode pop3_state_auth_login_password_resp(struct connectdata *conn, /* Create the password message */ /* Create the password message */ result = Curl_sasl_create_login_message(data, conn->passwd, result = Curl_sasl_create_login_message(data, conn->passwd, &authpasswd, &len); &authpasswd, &len); if(!result && authpasswd) { /* Send the password */ /* Send the password */ if(!result) { if(authpasswd) { result = Curl_pp_sendf(&conn->proto.pop3c.pp, "%s", authpasswd); result = Curl_pp_sendf(&conn->proto.pop3c.pp, "%s", authpasswd); if(!result) if(!result) state(conn, POP3_AUTH_FINAL); state(conn, POP3_AUTH_FINAL); } } } Curl_safefree(authpasswd); Curl_safefree(authpasswd); } } return result; return result; } } Loading Loading @@ -1110,19 +1101,16 @@ static CURLcode pop3_state_auth_ntlm_resp(struct connectdata *conn, result = Curl_sasl_create_ntlm_type1_message(conn->user, conn->passwd, result = Curl_sasl_create_ntlm_type1_message(conn->user, conn->passwd, &conn->ntlm, &conn->ntlm, &type1msg, &len); &type1msg, &len); if(!result && type1msg) { /* Send the message */ /* Send the message */ if(!result) { if(type1msg) { result = Curl_pp_sendf(&conn->proto.pop3c.pp, "%s", type1msg); result = Curl_pp_sendf(&conn->proto.pop3c.pp, "%s", type1msg); if(!result) if(!result) state(conn, POP3_AUTH_NTLM_TYPE2MSG); state(conn, POP3_AUTH_NTLM_TYPE2MSG); } } } Curl_safefree(type1msg); Curl_safefree(type1msg); } } return result; return result; } } Loading Loading @@ -1198,19 +1186,16 @@ static CURLcode pop3_state_auth_xoauth2_resp(struct connectdata *conn, result = Curl_sasl_create_xoauth2_message(conn->data, conn->user, result = Curl_sasl_create_xoauth2_message(conn->data, conn->user, conn->xoauth2_bearer, conn->xoauth2_bearer, &xoauth, &len); &xoauth, &len); if(!result && xoauth) { /* Send the message */ /* Send the message */ if(!result) { if(xoauth) { result = Curl_pp_sendf(&conn->proto.pop3c.pp, "%s", xoauth); result = Curl_pp_sendf(&conn->proto.pop3c.pp, "%s", xoauth); if(!result) if(!result) state(conn, POP3_AUTH_FINAL); state(conn, POP3_AUTH_FINAL); } } } Curl_safefree(xoauth); Curl_safefree(xoauth); } } return result; return result; } } Loading lib/smtp.c +35 −50 Original line number Original line Diff line number Diff line Loading @@ -845,19 +845,16 @@ static CURLcode smtp_state_auth_plain_resp(struct connectdata *conn, /* Create the authorisation message */ /* Create the authorisation message */ result = Curl_sasl_create_plain_message(conn->data, conn->user, result = Curl_sasl_create_plain_message(conn->data, conn->user, conn->passwd, &plainauth, &len); conn->passwd, &plainauth, &len); if(!result && plainauth) { /* Send the message */ /* Send the message */ if(!result) { if(plainauth) { result = Curl_pp_sendf(&conn->proto.smtpc.pp, "%s", plainauth); result = Curl_pp_sendf(&conn->proto.smtpc.pp, "%s", plainauth); if(!result) if(!result) state(conn, SMTP_AUTH_FINAL); state(conn, SMTP_AUTH_FINAL); } } } Curl_safefree(plainauth); Curl_safefree(plainauth); } } return result; return result; } } Loading @@ -882,19 +879,16 @@ static CURLcode smtp_state_auth_login_resp(struct connectdata *conn, /* Create the user message */ /* Create the user message */ result = Curl_sasl_create_login_message(conn->data, conn->user, result = Curl_sasl_create_login_message(conn->data, conn->user, &authuser, &len); &authuser, &len); if(!result && authuser) { /* Send the user */ /* Send the user */ if(!result) { if(authuser) { result = Curl_pp_sendf(&conn->proto.smtpc.pp, "%s", authuser); result = Curl_pp_sendf(&conn->proto.smtpc.pp, "%s", authuser); if(!result) if(!result) state(conn, SMTP_AUTH_LOGIN_PASSWD); state(conn, SMTP_AUTH_LOGIN_PASSWD); } } } Curl_safefree(authuser); Curl_safefree(authuser); } } return result; return result; } } Loading @@ -919,19 +913,16 @@ static CURLcode smtp_state_auth_login_password_resp(struct connectdata *conn, /* Create the password message */ /* Create the password message */ result = Curl_sasl_create_login_message(conn->data, conn->passwd, result = Curl_sasl_create_login_message(conn->data, conn->passwd, &authpasswd, &len); &authpasswd, &len); if(!result && authpasswd) { /* Send the password */ /* Send the password */ if(!result) { if(authpasswd) { result = Curl_pp_sendf(&conn->proto.smtpc.pp, "%s", authpasswd); result = Curl_pp_sendf(&conn->proto.smtpc.pp, "%s", authpasswd); if(!result) if(!result) state(conn, SMTP_AUTH_FINAL); state(conn, SMTP_AUTH_FINAL); } } } Curl_safefree(authpasswd); Curl_safefree(authpasswd); } } return result; return result; } } Loading Loading @@ -1091,19 +1082,16 @@ static CURLcode smtp_state_auth_ntlm_resp(struct connectdata *conn, result = Curl_sasl_create_ntlm_type1_message(conn->user, conn->passwd, result = Curl_sasl_create_ntlm_type1_message(conn->user, conn->passwd, &conn->ntlm, &conn->ntlm, &type1msg, &len); &type1msg, &len); if(!result && type1msg) { /* Send the message */ /* Send the message */ if(!result) { if(type1msg) { result = Curl_pp_sendf(&conn->proto.smtpc.pp, "%s", type1msg); result = Curl_pp_sendf(&conn->proto.smtpc.pp, "%s", type1msg); if(!result) if(!result) state(conn, SMTP_AUTH_NTLM_TYPE2MSG); state(conn, SMTP_AUTH_NTLM_TYPE2MSG); } } } Curl_safefree(type1msg); Curl_safefree(type1msg); } } return result; return result; } } Loading Loading @@ -1179,19 +1167,16 @@ static CURLcode smtp_state_auth_xoauth2_resp(struct connectdata *conn, result = Curl_sasl_create_xoauth2_message(conn->data, conn->user, result = Curl_sasl_create_xoauth2_message(conn->data, conn->user, conn->xoauth2_bearer, conn->xoauth2_bearer, &xoauth, &len); &xoauth, &len); if(!result && xoauth) { /* Send the message */ /* Send the message */ if(!result) { if(xoauth) { result = Curl_pp_sendf(&conn->proto.smtpc.pp, "%s", xoauth); result = Curl_pp_sendf(&conn->proto.smtpc.pp, "%s", xoauth); if(!result) if(!result) state(conn, SMTP_AUTH_FINAL); state(conn, SMTP_AUTH_FINAL); } } } Curl_safefree(xoauth); Curl_safefree(xoauth); } } return result; return result; } } Loading Loading
RELEASE-NOTES +1 −3 Original line number Original line Diff line number Diff line Loading @@ -10,9 +10,7 @@ Curl and libcurl 7.33.1 This release includes the following changes: This release includes the following changes: o SSL: protocol version can be specified more precisely [1] o SSL: protocol version can be specified more precisely [1] o email: Added support for cancelling NTLM authentication o imap/pop3/smtp: Added graceful cancellation of SASL authentication o email: Added support for cancelling DIGEST-MD5 authentication o email: Added support for canceling CRAM-MD5 authentication o Add "Happy Eyeballs" for IPv4/IPv6 dual connect attempts o Add "Happy Eyeballs" for IPv4/IPv6 dual connect attempts This release includes the following bugfixes: This release includes the following bugfixes: Loading
lib/curl_sasl.c +6 −7 Original line number Original line Diff line number Diff line Loading @@ -559,14 +559,14 @@ CURLcode Curl_sasl_create_ntlm_type3_message(struct SessionHandle *data, /* /* * Curl_sasl_create_xoauth2_message() * Curl_sasl_create_xoauth2_message() * * * This is used to generate an already encoded XOAUTH2 message ready * This is used to generate an already encoded OAuth 2.0 message ready for * for sending to the recipient. * sending to the recipient. * * * Parameters: * Parameters: * * * data [in] - The session handle. * data [in] - The session handle. * user [in] - The user name. * user [in] - The user name. * bearer [in] - The XOAUTH Bearer token. * bearer [in] - The bearer token. * outptr [in/out] - The address where a pointer to newly allocated memory * outptr [in/out] - The address where a pointer to newly allocated memory * holding the result will be stored upon completion. * holding the result will be stored upon completion. * outlen [out] - The length of the output message. * outlen [out] - The length of the output message. Loading @@ -579,16 +579,15 @@ CURLcode Curl_sasl_create_xoauth2_message(struct SessionHandle *data, char **outptr, size_t *outlen) char **outptr, size_t *outlen) { { CURLcode result = CURLE_OK; CURLcode result = CURLE_OK; char *xoauth; char *xoauth = NULL; /* Generate the message */ xoauth = aprintf("user=%s\1auth=Bearer %s\1\1", user, bearer); xoauth = aprintf("user=%s\1auth=Bearer %s\1\1", user, bearer); if(!xoauth) if(!xoauth) return CURLE_OUT_OF_MEMORY; return CURLE_OUT_OF_MEMORY; /* Base64 encode the reply */ /* Base64 encode the reply */ result = Curl_base64_encode(data, xoauth, strlen(xoauth), outptr, result = Curl_base64_encode(data, xoauth, strlen(xoauth), outptr, outlen); outlen); Curl_safefree(xoauth); Curl_safefree(xoauth); Loading
lib/imap.c +35 −50 Original line number Original line Diff line number Diff line Loading @@ -1007,19 +1007,16 @@ static CURLcode imap_state_auth_plain_resp(struct connectdata *conn, /* Create the authorisation message */ /* Create the authorisation message */ result = Curl_sasl_create_plain_message(data, conn->user, conn->passwd, result = Curl_sasl_create_plain_message(data, conn->user, conn->passwd, &plainauth, &len); &plainauth, &len); if(!result && plainauth) { /* Send the message */ /* Send the message */ if(!result) { if(plainauth) { result = Curl_pp_sendf(&conn->proto.imapc.pp, "%s", plainauth); result = Curl_pp_sendf(&conn->proto.imapc.pp, "%s", plainauth); if(!result) if(!result) state(conn, IMAP_AUTHENTICATE_FINAL); state(conn, IMAP_AUTHENTICATE_FINAL); } } } Curl_safefree(plainauth); Curl_safefree(plainauth); } } return result; return result; } } Loading @@ -1044,19 +1041,16 @@ static CURLcode imap_state_auth_login_resp(struct connectdata *conn, /* Create the user message */ /* Create the user message */ result = Curl_sasl_create_login_message(data, conn->user, result = Curl_sasl_create_login_message(data, conn->user, &authuser, &len); &authuser, &len); if(!result && authuser) { /* Send the user */ /* Send the user */ if(!result) { if(authuser) { result = Curl_pp_sendf(&conn->proto.imapc.pp, "%s", authuser); result = Curl_pp_sendf(&conn->proto.imapc.pp, "%s", authuser); if(!result) if(!result) state(conn, IMAP_AUTHENTICATE_LOGIN_PASSWD); state(conn, IMAP_AUTHENTICATE_LOGIN_PASSWD); } } } Curl_safefree(authuser); Curl_safefree(authuser); } } return result; return result; } } Loading @@ -1081,19 +1075,16 @@ static CURLcode imap_state_auth_login_password_resp(struct connectdata *conn, /* Create the password message */ /* Create the password message */ result = Curl_sasl_create_login_message(data, conn->passwd, result = Curl_sasl_create_login_message(data, conn->passwd, &authpasswd, &len); &authpasswd, &len); if(!result && authpasswd) { /* Send the password */ /* Send the password */ if(!result) { if(authpasswd) { result = Curl_pp_sendf(&conn->proto.imapc.pp, "%s", authpasswd); result = Curl_pp_sendf(&conn->proto.imapc.pp, "%s", authpasswd); if(!result) if(!result) state(conn, IMAP_AUTHENTICATE_FINAL); state(conn, IMAP_AUTHENTICATE_FINAL); } } } Curl_safefree(authpasswd); Curl_safefree(authpasswd); } } return result; return result; } } Loading Loading @@ -1252,19 +1243,16 @@ static CURLcode imap_state_auth_ntlm_resp(struct connectdata *conn, result = Curl_sasl_create_ntlm_type1_message(conn->user, conn->passwd, result = Curl_sasl_create_ntlm_type1_message(conn->user, conn->passwd, &conn->ntlm, &conn->ntlm, &type1msg, &len); &type1msg, &len); if(!result && type1msg) { /* Send the message */ /* Send the message */ if(!result) { if(type1msg) { result = Curl_pp_sendf(&conn->proto.imapc.pp, "%s", type1msg); result = Curl_pp_sendf(&conn->proto.imapc.pp, "%s", type1msg); if(!result) if(!result) state(conn, IMAP_AUTHENTICATE_NTLM_TYPE2MSG); state(conn, IMAP_AUTHENTICATE_NTLM_TYPE2MSG); } } } Curl_safefree(type1msg); Curl_safefree(type1msg); } } return result; return result; } } Loading Loading @@ -1341,19 +1329,16 @@ static CURLcode imap_state_auth_xoauth2_resp(struct connectdata *conn, result = Curl_sasl_create_xoauth2_message(conn->data, conn->user, result = Curl_sasl_create_xoauth2_message(conn->data, conn->user, conn->xoauth2_bearer, conn->xoauth2_bearer, &xoauth, &len); &xoauth, &len); if(!result && xoauth) { /* Send the message */ /* Send the message */ if(!result) { if(xoauth) { result = Curl_pp_sendf(&conn->proto.imapc.pp, "%s", xoauth); result = Curl_pp_sendf(&conn->proto.imapc.pp, "%s", xoauth); if(!result) if(!result) state(conn, IMAP_AUTHENTICATE_FINAL); state(conn, IMAP_AUTHENTICATE_FINAL); } } } Curl_safefree(xoauth); Curl_safefree(xoauth); } } return result; return result; } } Loading
lib/pop3.c +35 −50 Original line number Original line Diff line number Diff line Loading @@ -865,19 +865,16 @@ static CURLcode pop3_state_auth_plain_resp(struct connectdata *conn, /* Create the authorisation message */ /* Create the authorisation message */ result = Curl_sasl_create_plain_message(data, conn->user, conn->passwd, result = Curl_sasl_create_plain_message(data, conn->user, conn->passwd, &plainauth, &len); &plainauth, &len); if(!result && plainauth) { /* Send the message */ /* Send the message */ if(!result) { if(plainauth) { result = Curl_pp_sendf(&conn->proto.pop3c.pp, "%s", plainauth); result = Curl_pp_sendf(&conn->proto.pop3c.pp, "%s", plainauth); if(!result) if(!result) state(conn, POP3_AUTH_FINAL); state(conn, POP3_AUTH_FINAL); } } } Curl_safefree(plainauth); Curl_safefree(plainauth); } } return result; return result; } } Loading @@ -902,19 +899,16 @@ static CURLcode pop3_state_auth_login_resp(struct connectdata *conn, /* Create the user message */ /* Create the user message */ result = Curl_sasl_create_login_message(data, conn->user, result = Curl_sasl_create_login_message(data, conn->user, &authuser, &len); &authuser, &len); if(!result && authuser) { /* Send the user */ /* Send the user */ if(!result) { if(authuser) { result = Curl_pp_sendf(&conn->proto.pop3c.pp, "%s", authuser); result = Curl_pp_sendf(&conn->proto.pop3c.pp, "%s", authuser); if(!result) if(!result) state(conn, POP3_AUTH_LOGIN_PASSWD); state(conn, POP3_AUTH_LOGIN_PASSWD); } } } Curl_safefree(authuser); Curl_safefree(authuser); } } return result; return result; } } Loading @@ -939,19 +933,16 @@ static CURLcode pop3_state_auth_login_password_resp(struct connectdata *conn, /* Create the password message */ /* Create the password message */ result = Curl_sasl_create_login_message(data, conn->passwd, result = Curl_sasl_create_login_message(data, conn->passwd, &authpasswd, &len); &authpasswd, &len); if(!result && authpasswd) { /* Send the password */ /* Send the password */ if(!result) { if(authpasswd) { result = Curl_pp_sendf(&conn->proto.pop3c.pp, "%s", authpasswd); result = Curl_pp_sendf(&conn->proto.pop3c.pp, "%s", authpasswd); if(!result) if(!result) state(conn, POP3_AUTH_FINAL); state(conn, POP3_AUTH_FINAL); } } } Curl_safefree(authpasswd); Curl_safefree(authpasswd); } } return result; return result; } } Loading Loading @@ -1110,19 +1101,16 @@ static CURLcode pop3_state_auth_ntlm_resp(struct connectdata *conn, result = Curl_sasl_create_ntlm_type1_message(conn->user, conn->passwd, result = Curl_sasl_create_ntlm_type1_message(conn->user, conn->passwd, &conn->ntlm, &conn->ntlm, &type1msg, &len); &type1msg, &len); if(!result && type1msg) { /* Send the message */ /* Send the message */ if(!result) { if(type1msg) { result = Curl_pp_sendf(&conn->proto.pop3c.pp, "%s", type1msg); result = Curl_pp_sendf(&conn->proto.pop3c.pp, "%s", type1msg); if(!result) if(!result) state(conn, POP3_AUTH_NTLM_TYPE2MSG); state(conn, POP3_AUTH_NTLM_TYPE2MSG); } } } Curl_safefree(type1msg); Curl_safefree(type1msg); } } return result; return result; } } Loading Loading @@ -1198,19 +1186,16 @@ static CURLcode pop3_state_auth_xoauth2_resp(struct connectdata *conn, result = Curl_sasl_create_xoauth2_message(conn->data, conn->user, result = Curl_sasl_create_xoauth2_message(conn->data, conn->user, conn->xoauth2_bearer, conn->xoauth2_bearer, &xoauth, &len); &xoauth, &len); if(!result && xoauth) { /* Send the message */ /* Send the message */ if(!result) { if(xoauth) { result = Curl_pp_sendf(&conn->proto.pop3c.pp, "%s", xoauth); result = Curl_pp_sendf(&conn->proto.pop3c.pp, "%s", xoauth); if(!result) if(!result) state(conn, POP3_AUTH_FINAL); state(conn, POP3_AUTH_FINAL); } } } Curl_safefree(xoauth); Curl_safefree(xoauth); } } return result; return result; } } Loading
lib/smtp.c +35 −50 Original line number Original line Diff line number Diff line Loading @@ -845,19 +845,16 @@ static CURLcode smtp_state_auth_plain_resp(struct connectdata *conn, /* Create the authorisation message */ /* Create the authorisation message */ result = Curl_sasl_create_plain_message(conn->data, conn->user, result = Curl_sasl_create_plain_message(conn->data, conn->user, conn->passwd, &plainauth, &len); conn->passwd, &plainauth, &len); if(!result && plainauth) { /* Send the message */ /* Send the message */ if(!result) { if(plainauth) { result = Curl_pp_sendf(&conn->proto.smtpc.pp, "%s", plainauth); result = Curl_pp_sendf(&conn->proto.smtpc.pp, "%s", plainauth); if(!result) if(!result) state(conn, SMTP_AUTH_FINAL); state(conn, SMTP_AUTH_FINAL); } } } Curl_safefree(plainauth); Curl_safefree(plainauth); } } return result; return result; } } Loading @@ -882,19 +879,16 @@ static CURLcode smtp_state_auth_login_resp(struct connectdata *conn, /* Create the user message */ /* Create the user message */ result = Curl_sasl_create_login_message(conn->data, conn->user, result = Curl_sasl_create_login_message(conn->data, conn->user, &authuser, &len); &authuser, &len); if(!result && authuser) { /* Send the user */ /* Send the user */ if(!result) { if(authuser) { result = Curl_pp_sendf(&conn->proto.smtpc.pp, "%s", authuser); result = Curl_pp_sendf(&conn->proto.smtpc.pp, "%s", authuser); if(!result) if(!result) state(conn, SMTP_AUTH_LOGIN_PASSWD); state(conn, SMTP_AUTH_LOGIN_PASSWD); } } } Curl_safefree(authuser); Curl_safefree(authuser); } } return result; return result; } } Loading @@ -919,19 +913,16 @@ static CURLcode smtp_state_auth_login_password_resp(struct connectdata *conn, /* Create the password message */ /* Create the password message */ result = Curl_sasl_create_login_message(conn->data, conn->passwd, result = Curl_sasl_create_login_message(conn->data, conn->passwd, &authpasswd, &len); &authpasswd, &len); if(!result && authpasswd) { /* Send the password */ /* Send the password */ if(!result) { if(authpasswd) { result = Curl_pp_sendf(&conn->proto.smtpc.pp, "%s", authpasswd); result = Curl_pp_sendf(&conn->proto.smtpc.pp, "%s", authpasswd); if(!result) if(!result) state(conn, SMTP_AUTH_FINAL); state(conn, SMTP_AUTH_FINAL); } } } Curl_safefree(authpasswd); Curl_safefree(authpasswd); } } return result; return result; } } Loading Loading @@ -1091,19 +1082,16 @@ static CURLcode smtp_state_auth_ntlm_resp(struct connectdata *conn, result = Curl_sasl_create_ntlm_type1_message(conn->user, conn->passwd, result = Curl_sasl_create_ntlm_type1_message(conn->user, conn->passwd, &conn->ntlm, &conn->ntlm, &type1msg, &len); &type1msg, &len); if(!result && type1msg) { /* Send the message */ /* Send the message */ if(!result) { if(type1msg) { result = Curl_pp_sendf(&conn->proto.smtpc.pp, "%s", type1msg); result = Curl_pp_sendf(&conn->proto.smtpc.pp, "%s", type1msg); if(!result) if(!result) state(conn, SMTP_AUTH_NTLM_TYPE2MSG); state(conn, SMTP_AUTH_NTLM_TYPE2MSG); } } } Curl_safefree(type1msg); Curl_safefree(type1msg); } } return result; return result; } } Loading Loading @@ -1179,19 +1167,16 @@ static CURLcode smtp_state_auth_xoauth2_resp(struct connectdata *conn, result = Curl_sasl_create_xoauth2_message(conn->data, conn->user, result = Curl_sasl_create_xoauth2_message(conn->data, conn->user, conn->xoauth2_bearer, conn->xoauth2_bearer, &xoauth, &len); &xoauth, &len); if(!result && xoauth) { /* Send the message */ /* Send the message */ if(!result) { if(xoauth) { result = Curl_pp_sendf(&conn->proto.smtpc.pp, "%s", xoauth); result = Curl_pp_sendf(&conn->proto.smtpc.pp, "%s", xoauth); if(!result) if(!result) state(conn, SMTP_AUTH_FINAL); state(conn, SMTP_AUTH_FINAL); } } } Curl_safefree(xoauth); Curl_safefree(xoauth); } } return result; return result; } } Loading