mirror of
https://github.com/moparisthebest/curl
synced 2024-11-15 14:05:03 -05:00
sasl: Don't choose OAuth 2.0 if mechanism not advertised
Regression from commit 9e8ced9890
which meant if --oauth2-bearer was
specified but the SASL mechanism wasn't supported by the server then
the mechanism would be chosen.
This commit is contained in:
parent
a7c4bcd971
commit
d6d58dd558
@ -1455,7 +1455,8 @@ CURLcode Curl_sasl_start(struct SASL *sasl, struct connectdata *conn,
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
if((enabledmechs & SASL_MECH_XOAUTH2) || conn->oauth_bearer) {
|
if((enabledmechs & SASL_MECH_XOAUTH2) && ((conn->oauth_bearer) ||
|
||||||
|
(!conn->passwd))) {
|
||||||
mech = SASL_MECH_STRING_XOAUTH2;
|
mech = SASL_MECH_STRING_XOAUTH2;
|
||||||
state1 = SASL_XOAUTH2;
|
state1 = SASL_XOAUTH2;
|
||||||
sasl->authused = SASL_MECH_XOAUTH2;
|
sasl->authused = SASL_MECH_XOAUTH2;
|
||||||
|
Loading…
Reference in New Issue
Block a user