From f1a39f221d57354990e3eeeddc3404aede2aff70 Mon Sep 17 00:00:00 2001
From: Daniel Stenberg <daniel@haxx.se>
Date: Sat, 21 Feb 2026 18:11:41 +0100
Subject: [PATCH] url: fix copy and paste url_match_auth_nego mistake

Follow-up to 34fa034
Reported-by: dahmono on github
Closes #20662

Upstream-Status: Backport [https://github.com/curl/curl/commit/f1a39f221d57354990]
Backported by Ubuntu team http://archive.ubuntu.com/ubuntu/pool/main/c/curl/curl_8.5.0-2ubuntu10.8.debian.tar.xz

CVE: CVE-2026-1965
Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
---
 lib/url.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/url.c b/lib/url.c
index 792c422..22ed0be 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -1319,7 +1319,7 @@ ConnectionExists(struct Curl_easy *data,
     continue;
   }
 #endif
-  if(wantNTLMhttp || wantProxyNTLMhttp) {
+  if(wantNegohttp || wantProxyNegohttp) {
     /* Credentials are already checked, we may use this connection. We MUST
      * use a connection where it has already been fully negotiated. If it has
      * not, we keep on looking for a better one. */
-- 
2.43.0

