]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Fix incorrect authentication headers on cache digest requests
authorAymeric Vincent <aymericvincent@free.fr>
Mon, 26 Oct 2015 02:53:30 +0000 (19:53 -0700)
committerAmos Jeffries <squid3@treenet.co.nz>
Mon, 26 Oct 2015 02:53:30 +0000 (19:53 -0700)
  login=NEGOTIATE can have an additional parameter specified,
   like login=NEGOTIATE:xxx

One test added in rev.12714 does not take this case into account and it
will send a garbage "login:password" (== "NEGOTIATE:xxx") to its peer
when requesting a digest.

This is a workaround patch to remove the broken Authentication headers
entirely. Support for Negotiate to the peer on these digest requests is
still needed.

src/peer_digest.cc

index 80ae96be51ff80edaa907973244ecba353113b94..97cfbf1ae4aaf9d936b8412cbe9b4217c5472340 100644 (file)
@@ -351,7 +351,7 @@ peerDigestRequest(PeerDigest * pd)
             p->login[0] != '*' &&
             strcmp(p->login, "PASS") != 0 &&
             strcmp(p->login, "PASSTHRU") != 0 &&
-            strcmp(p->login, "NEGOTIATE") != 0 &&
+            strncmp(p->login, "NEGOTIATE",9) != 0 &&
             strcmp(p->login, "PROXYPASS") != 0) {
         req->url.userInfo(SBuf(p->login)); // XXX: performance regression make peer login SBuf as well.
     }