← Commit list

557a52f21e

Stefan Eissing
Stefan Eissing
2026-09-21
SUCCESS Duration: 424s

Subject

http: only enable Negotiate/NTLM to allowed origins

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

lib/http.c+10 -5
@@ -691,7 +691,8 @@ static CURLcode output_auth_headers(struct Curl_easy *data,
(proxy && !Curl_checkProxyheaders(data, conn,
STRCONST("Proxy-authorization"))) ||
#endif
- (!proxy && !Curl_checkheaders(data, STRCONST("Authorization")))) {
+ (!proxy && !Curl_checkheaders(data, STRCONST("Authorization")) &&
+ Curl_auth_allowed_to_host(data))) {
auth = "Negotiate";
result = Curl_output_negotiate(data, conn, proxy);
if(result)
@@ -704,10 +705,14 @@ static CURLcode output_auth_headers(struct Curl_easy *data,
#endif
#ifdef USE_NTLM
if(authstatus->picked == CURLAUTH_NTLM) {
- auth = "NTLM";
- result = Curl_output_ntlm(data, proxy);
- if(result)
- return result;
+ if(proxy || Curl_auth_allowed_to_host(data)) {
+ auth = "NTLM";
+ result = Curl_output_ntlm(data, proxy);
+ if(result)
+ return result;
+ }
+ else
+ authstatus->done = TRUE;
}
else
#endif