diff options
author | dartraiden <wowemuh@gmail.com> | 2022-10-29 17:16:34 +0300 |
---|---|---|
committer | dartraiden <wowemuh@gmail.com> | 2022-10-29 17:18:05 +0300 |
commit | 719ecdacd9db5e91a77935915763a466f56eec4a (patch) | |
tree | dbf98b0c64857ea3483df0fcb970c77234990216 /libs/libcurl/src/vauth/vauth.c | |
parent | 80ca1947771c0a993abd903cabca462d0d0eb484 (diff) |
libcurl: update to 7.86.0
Diffstat (limited to 'libs/libcurl/src/vauth/vauth.c')
-rw-r--r-- | libs/libcurl/src/vauth/vauth.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/libs/libcurl/src/vauth/vauth.c b/libs/libcurl/src/vauth/vauth.c index 9d6363df07..58fe05139d 100644 --- a/libs/libcurl/src/vauth/vauth.c +++ b/libs/libcurl/src/vauth/vauth.c @@ -27,6 +27,8 @@ #include <curl/curl.h> #include "vauth.h" +#include "urldata.h" +#include "strcase.h" #include "curl_multibyte.h" #include "curl_printf.h" @@ -144,3 +146,18 @@ bool Curl_auth_user_contains_domain(const char *user) return valid; } + +/* + * Curl_auth_ollowed_to_host() tells if authentication, cookies or other + * "sensitive data" can (still) be sent to this host. + */ +bool Curl_auth_allowed_to_host(struct Curl_easy *data) +{ + struct connectdata *conn = data->conn; + return (!data->state.this_is_a_follow || + data->set.allow_auth_to_other_hosts || + (data->state.first_host && + strcasecompare(data->state.first_host, conn->host.name) && + (data->state.first_remote_port == conn->remote_port) && + (data->state.first_remote_protocol == conn->handler->protocol))); +} |