c260e0
From a4c6f86f94e7b86026770e8b9da034daf514e5bc Mon Sep 17 00:00:00 2001
c260e0
From: Daniel Stenberg <daniel@haxx.se>
c260e0
Date: Thu, 16 Apr 2015 13:26:46 +0200
c260e0
Subject: [PATCH] ConnectionExists: for NTLM re-use, require credentials to
c260e0
 match
c260e0
c260e0
CVE-2015-3143
c260e0
c260e0
Bug: http://curl.haxx.se/docs/adv_20150422A.html
c260e0
Reported-by: Paras Sethia
c260e0
c260e0
Upstream-commit: 31be461c6b659312100c47be6ddd5f0f569290f6
c260e0
Signed-off-by: Kamil Dudka <kdudka@redhat.com>
c260e0
---
c260e0
 lib/url.c | 2 +-
c260e0
 1 file changed, 1 insertion(+), 1 deletion(-)
c260e0
c260e0
diff --git a/lib/url.c b/lib/url.c
c260e0
index 22e3856..2dc56ae 100644
c260e0
--- a/lib/url.c
c260e0
+++ b/lib/url.c
c260e0
@@ -2973,7 +2973,7 @@ ConnectionExists(struct SessionHandle *data,
c260e0
             }
c260e0
           }
c260e0
           if((!(needle->handler->flags & PROTOPT_CREDSPERREQUEST)) ||
c260e0
-             ((needle->handler->protocol & CURLPROTO_HTTP) && wantNTLM)) {
c260e0
+             (wantNTLM || check->ntlm.state != NTLMSTATE_NONE)) {
c260e0
             /* This proto requires credentials per connection or is HTTP+NTLM,
c260e0
                so verify that we're using the same name and password as well */
c260e0
             if(!strequal(needle->user, check->user) ||
c260e0
-- 
c260e0
2.3.6
c260e0