]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Bug 3290: authenticate_ttl not working for digest authentication
authorGarri Djavadyan <garryd@comnet.uz>
Fri, 16 Dec 2016 12:05:19 +0000 (01:05 +1300)
committerAmos Jeffries <squid3@treenet.co.nz>
Fri, 16 Dec 2016 12:05:19 +0000 (01:05 +1300)
src/auth/digest/UserRequest.cc
src/auth/digest/auth_digest.cc

index 011f10941ec3adb524ea42c21dee2384603f234c..40d2392b274b7c7b4e457008f43e2f93e8c63f6e 100644 (file)
@@ -166,12 +166,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
index 610f5471754220e28f7e1f2e89309b6ccf5b9e7d..a7d79b872bd2b0cd8823d1ecd6486f9c7ad2011a 100644 (file)
@@ -1089,6 +1089,10 @@ Auth::Digest::Config::decode(char const *proxy_auth)
          * 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, HERE << "Found user '" << username << "' in the user cache as '" << auth_user << "'");
         digest_user = static_cast<Auth::Digest::User *>(auth_user.getRaw());