]> granicus.if.org Git - curl/commitdiff
ConnectionExists: for NTLM re-use, require credentials to match
authorDaniel Stenberg <daniel@haxx.se>
Thu, 16 Apr 2015 11:26:46 +0000 (13:26 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Tue, 21 Apr 2015 21:20:36 +0000 (23:20 +0200)
CVE-2015-3143

Bug: http://curl.haxx.se/docs/adv_20150422A.html
Reported-by: Paras Sethia
lib/url.c

index 018bb88761c39710efbe1ee033e8c44d55ad7572..ee3d176d9612e659a8f14679b4828c0b402b6f8e 100644 (file)
--- a/lib/url.c
+++ b/lib/url.c
@@ -3209,7 +3209,7 @@ ConnectionExists(struct SessionHandle *data,
       }
 
       if((!(needle->handler->flags & PROTOPT_CREDSPERREQUEST)) ||
-         wantNTLMhttp) {
+         (wantNTLMhttp || check->ntlm.state != NTLMSTATE_NONE)) {
         /* This protocol requires credentials per connection or is HTTP+NTLM,
            so verify that we're using the same name and password as well */
         if(!strequal(needle->user, check->user) ||