]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Author: Henrik Nordstrom <henrik@henriknordstrom.net>
authorAmos Jeffries <squid3@treenet.co.nz>
Sat, 6 Mar 2010 03:42:04 +0000 (16:42 +1300)
committerAmos Jeffries <squid3@treenet.co.nz>
Sat, 6 Mar 2010 03:42:04 +0000 (16:42 +1300)
Bug 2367: Fix stale=true on digest requests with unknown nonce

The nonce staleness check only worked if the stale nonce had not yet
been garbage collected, often resulting in incorrect stale=false
responses and resulting auth popups when using digest auth.

Note: this fix is different from how it's done in squid-2 where fixHeader
is called on all schemes in such conditions but only the active one with
and auth_user_request. Not entirely sure why that is done, but commit
message says something about Negotiate authentication.

src/auth/digest/auth_digest.cc

index db5de66f091f5b5993f4e30d1c3e22b789092436..ce1c9cf96afa1eeac24696da6e606768ed574de0 100644 (file)
@@ -1298,6 +1298,7 @@ AuthDigestConfig::decode(char const *proxy_auth)
     if (!nonce) {
         /* we couldn't find a matching nonce! */
         debugs(29, 2, "authenticateDigestDecode: Unexpected or invalid nonce received");
+        digest_request->credentials(AuthDigestUserRequest::Failed);
         return authDigestLogUsername(username, digest_request);
     }