From: Henrik Nordstrom Date: Fri, 5 Mar 2010 23:13:33 +0000 (+0100) Subject: Fix stale=true on digest requests with unknown nonce X-Git-Tag: SQUID_3_2_0_1~385 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=fa004391c5c092e034ef865977dada246dd89568;p=thirdparty%2Fsquid.git 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. --- diff --git a/src/auth/digest/auth_digest.cc b/src/auth/digest/auth_digest.cc index d3b896f528..18c0c2ddc1 100644 --- a/src/auth/digest/auth_digest.cc +++ b/src/auth/digest/auth_digest.cc @@ -1294,6 +1294,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); }