]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Bug 3290: authenticate_ttl not working for digest authentication
authorGarri Djavadyan <garryd@comnet.uz>
Sun, 27 Nov 2016 13:57:50 +0000 (02:57 +1300)
committerAmos Jeffries <squid3@treenet.co.nz>
Sun, 27 Nov 2016 13:57:50 +0000 (02:57 +1300)
src/auth/digest/Config.cc
src/auth/digest/UserRequest.cc

index bf6dddbcee0eb7024f5954ac110c728546ff70dd..0ad3a408f7afa648d5fd8c4648ae26a854c185c7 100644 (file)
@@ -1064,6 +1064,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 77f3d0573d90684f3e013187358bd86daf6ca3cb..3afebb4d4ce82bc3f59ad585596bdd0c26a02a24 100644 (file)
@@ -187,12 +187,7 @@ Auth::Digest::UserRequest::authenticate(HttpRequest * request, ConnStateData *,
     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