diff options
-rw-r--r-- | lib/curl_sasl.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/curl_sasl.c b/lib/curl_sasl.c index a0c989915..8ccfac84a 100644 --- a/lib/curl_sasl.c +++ b/lib/curl_sasl.c @@ -1455,7 +1455,8 @@ CURLcode Curl_sasl_start(struct SASL *sasl, struct connectdata *conn, } else #endif - if((enabledmechs & SASL_MECH_XOAUTH2) || conn->oauth_bearer) { + if((enabledmechs & SASL_MECH_XOAUTH2) && ((conn->oauth_bearer) || + (!conn->passwd))) { mech = SASL_MECH_STRING_XOAUTH2; state1 = SASL_XOAUTH2; sasl->authused = SASL_MECH_XOAUTH2; |