From: Amos Jeffries Date: Mon, 22 Nov 2010 09:52:34 +0000 (+1300) Subject: Bug 3059: Crash on digest auth headers with unknown nonce X-Git-Tag: take1~70 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=52b3c6e82bae8d8554959ffc87aa7c6b926bacf1;p=thirdparty%2Fsquid.git Bug 3059: Crash on digest auth headers with unknown nonce --- diff --git a/src/auth/digest/auth_digest.cc b/src/auth/digest/auth_digest.cc index c6ff1b3a1e..47c22a4f3f 100644 --- a/src/auth/digest/auth_digest.cc +++ b/src/auth/digest/auth_digest.cc @@ -1067,7 +1067,8 @@ 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->user()->credentials(AuthUser::Failed); + if (digest_request->user() != NULL) + digest_request->user()->credentials(AuthUser::Failed); return authDigestLogUsername(username, digest_request); }