sasl: Don't send authcid as authzid for the PLAIN mechanism as per RFC 4616

RFC 4616 specifies the authzid is optional in the client authentication
message and that the server will derive the authorisation identity
(authzid) from the authentication identity (authcid) when not specified
by the client.
This commit is contained in:
Steve Holme 2019-04-18 21:54:35 +01:00
parent b21701c54b
commit eb84ca3ea8
16 changed files with 29 additions and 29 deletions

View file

@ -367,7 +367,7 @@ CURLcode Curl_sasl_start(struct SASL *sasl, struct connectdata *conn,
sasl->authused = SASL_MECH_PLAIN;
if(force_ir || data->set.sasl_ir)
result = Curl_auth_create_plain_message(data, conn->user, conn->user,
result = Curl_auth_create_plain_message(data, NULL, conn->user,
conn->passwd, &resp, &len);
}
else if(enabledmechs & SASL_MECH_LOGIN) {
@ -450,7 +450,7 @@ CURLcode Curl_sasl_continue(struct SASL *sasl, struct connectdata *conn,
*progress = SASL_DONE;
return result;
case SASL_PLAIN:
result = Curl_auth_create_plain_message(data, conn->user, conn->user,
result = Curl_auth_create_plain_message(data, NULL, conn->user,
conn->passwd, &resp, &len);
break;
case SASL_LOGIN: