Dear developers,

Please review the attached patch for Squid-5 fixing the issue explained
in the bug report 3290 [1]. The issue is still reproducible using rev.
14947.

The problem exists because Squid resets expiration time for a user on
every successful authentication, regardless where the user was found in
the username cache or found by means of a helper. The patch instructs
Squid to reset expiration time only for users gotten from helper.

Thanks in advance! 

[1] http://bugs.squid-cache.org/show_bug.cgi?id=3290


Garri
=== modified file 'src/auth/digest/Config.cc'
--- src/auth/digest/Config.cc	2016-11-03 03:18:09 +0000
+++ src/auth/digest/Config.cc	2016-11-16 14:25:15 +0000
@@ -1064,6 +1064,10 @@
          * 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());

=== modified file 'src/auth/digest/UserRequest.cc'
--- src/auth/digest/UserRequest.cc	2016-01-01 00:12:18 +0000
+++ src/auth/digest/UserRequest.cc	2016-11-16 14:25:32 +0000
@@ -188,10 +188,6 @@
 
     /* 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;
 }
 

_______________________________________________
squid-dev mailing list
[email protected]
http://lists.squid-cache.org/listinfo/squid-dev

Reply via email to