mirror of
https://github.com/curl/curl.git
synced 2026-08-14 09:53:40 +03:00
http: only send bearer if auth is allowed
Verify with test 2006 Closes #20843
This commit is contained in:
parent
1495489c41
commit
e3d7401a32
3 changed files with 100 additions and 1 deletions
|
|
@ -705,6 +705,7 @@ static CURLcode output_auth_headers(struct Curl_easy *data,
|
|||
if(authstatus->picked == CURLAUTH_BEARER) {
|
||||
/* Bearer */
|
||||
if(!proxy && data->set.str[STRING_BEARER] &&
|
||||
Curl_auth_allowed_to_host(data) &&
|
||||
!Curl_checkheaders(data, STRCONST("Authorization"))) {
|
||||
auth = "Bearer";
|
||||
result = http_output_bearer(data);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue