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 https://launchpad.net/ubuntu/+archive/primary/+sourcefiles/curl/7.81.0-1ubuntu1.23/curl_7.81.0-1ubuntu1.23.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(-)

--- a/lib/url.c
+++ b/lib/url.c
@@ -1542,7 +1542,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. */
