]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Bug 3290: authenticate_ttl not working for digest authentication
authorGarri Djavadyan <garryd@comnet.uz>
Wed, 30 Nov 2016 23:33:04 +0000 (12:33 +1300)
committerAmos Jeffries <squid3@treenet.co.nz>
Wed, 30 Nov 2016 23:33:04 +0000 (12:33 +1300)
src/auth/digest/Config.cc
src/auth/digest/UserRequest.cc

index 05edb6c3813b61d296cfea75ecdf16004954603c..06ab24d2481e6533fbe0f04c70dc79baf86c938b 100644 (file)
@@ -1058,6 +1058,10 @@ Auth::Digest::Config::decode(char const *proxy_auth, const char *aRequestRealm)
          * the user agent won't change user name without warning.
          */
         authDigestUserLinkNonce(digest_user, nonce);
+
+        /* auth_user is now linked, we reset these values
+         * after external auth occurs anyway */
+        auth_user->expiretime = current_time.tv_sec;
     } else {
         debugs(29, 9, "Found user '" << username << "' in the user cache as '" << auth_user << "'");
         digest_user = static_cast<Auth::Digest::User *>(auth_user.getRaw());
index 270b73fed9638caeb0b6c2d189f60c4af6208707..ba35f7cdf633aedfda37b13e84f173ddf892a607 100644 (file)
@@ -187,12 +187,7 @@ Auth::Digest::UserRequest::authenticate(HttpRequest * request, ConnStateData * c
     auth_user->credentials(Auth::Ok);
 
     /* password was checked and did match */
-    debugs(29, 4, HERE << "user '" << auth_user->username() << "' validated OK");
-
-    /* auth_user is now linked, we reset these values
-     * after external auth occurs anyway */
-    auth_user->expiretime = current_time.tv_sec;
-    return;
+    debugs(29, 4, "user '" << auth_user->username() << "' validated OK");
 }
 
 Auth::Direction