mirror of
https://github.com/curl/curl.git
synced 2026-05-13 20:26:19 +03:00
curl_sasl: if redirected, require permission to use bearer
Closes #19933
This commit is contained in:
parent
bb134bba29
commit
1a822275d3
1 changed files with 6 additions and 2 deletions
|
|
@ -452,7 +452,9 @@ static bool sasl_choose_ntlm(struct Curl_easy *data, struct sasl_ctx *sctx)
|
|||
|
||||
static bool sasl_choose_oauth(struct Curl_easy *data, struct sasl_ctx *sctx)
|
||||
{
|
||||
const char *oauth_bearer = data->set.str[STRING_BEARER];
|
||||
const char *oauth_bearer =
|
||||
(!data->state.this_is_a_follow || data->set.allow_auth_to_other_hosts) ?
|
||||
data->set.str[STRING_BEARER] : NULL;
|
||||
|
||||
if(sctx->user && oauth_bearer &&
|
||||
(sctx->enabledmechs & SASL_MECH_OAUTHBEARER)) {
|
||||
|
|
@ -477,7 +479,9 @@ static bool sasl_choose_oauth(struct Curl_easy *data, struct sasl_ctx *sctx)
|
|||
|
||||
static bool sasl_choose_oauth2(struct Curl_easy *data, struct sasl_ctx *sctx)
|
||||
{
|
||||
const char *oauth_bearer = data->set.str[STRING_BEARER];
|
||||
const char *oauth_bearer =
|
||||
(!data->state.this_is_a_follow || data->set.allow_auth_to_other_hosts) ?
|
||||
data->set.str[STRING_BEARER] : NULL;
|
||||
|
||||
if(sctx->user && oauth_bearer &&
|
||||
(sctx->enabledmechs & SASL_MECH_XOAUTH2)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue