summaryrefslogtreecommitdiff
path: root/lib/http.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2022-04-25 17:59:15 +0200
committerDaniel Stenberg <daniel@haxx.se>2022-04-25 22:34:40 +0200
commit139a54ed0a172adaaf1a78d6f4fff50b2c3f9e08 (patch)
tree10143a686295e7dfdc881ed6e3fa20fd2afc8f7d /lib/http.c
parentaad7d9f9a63ab34a9cce20b4701c4315d26dc64b (diff)
downloadcurl-139a54ed0a172adaaf1a78d6f4fff50b2c3f9e08.tar.gz
openssl: don't leak the SRP credentials in redirects either
Follow-up to 620ea21410030 Reported-by: Harry Sintonen Closes #8751
Diffstat (limited to 'lib/http.c')
-rw-r--r--lib/http.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/http.c b/lib/http.c
index f0476f3b9..0d5c449bc 100644
--- a/lib/http.c
+++ b/lib/http.c
@@ -776,10 +776,10 @@ output_auth_headers(struct Curl_easy *data,
}
/*
- * allow_auth_to_host() tells if autentication, cookies or other "sensitive
- * data" can (still) be sent to this host.
+ * Curl_allow_auth_to_host() tells if authentication, cookies or other
+ * "sensitive data" can (still) be sent to this host.
*/
-static bool allow_auth_to_host(struct Curl_easy *data)
+bool Curl_allow_auth_to_host(struct Curl_easy *data)
{
struct connectdata *conn = data->conn;
return (!data->state.this_is_a_follow ||
@@ -864,7 +864,7 @@ Curl_http_output_auth(struct Curl_easy *data,
/* To prevent the user+password to get sent to other than the original host
due to a location-follow */
- if(allow_auth_to_host(data)
+ if(Curl_allow_auth_to_host(data)
#ifndef CURL_DISABLE_NETRC
|| conn->bits.netrc
#endif
@@ -1917,7 +1917,7 @@ CURLcode Curl_add_custom_headers(struct Curl_easy *data,
checkprefix("Cookie:", compare)) &&
/* be careful of sending this potentially sensitive header to
other hosts */
- !allow_auth_to_host(data))
+ !Curl_allow_auth_to_host(data))
;
else {
#ifdef USE_HYPER