------------------------------------------------------------ revno: 1162 committer: Mark Sapiro <msap...@value.net> branch nick: 2.2 timestamp: Mon 2011-04-25 15:42:31 -0700 message: A new mm_cfg.py setting AUTHENTICATION_COOKIE_LIFETIME has been added. If this is set to a non-zero value, web authentication cookies will expire that many seconds following their last use. Its default value is zero to preserve current behavior. modified: Mailman/Defaults.py.in Mailman/SecurityManager.py NEWS
-- lp:mailman/2.2 https://code.launchpad.net/~mailman-coders/mailman/2.2 Your team Mailman Checkins is subscribed to branch lp:mailman/2.2. To unsubscribe from this branch go to https://code.launchpad.net/~mailman-coders/mailman/2.2/+edit-subscription
=== modified file 'Mailman/Defaults.py.in' --- Mailman/Defaults.py.in 2011-02-07 20:01:02 +0000 +++ Mailman/Defaults.py.in 2011-04-25 22:42:31 +0000 @@ -104,6 +104,10 @@ # the site. Set this value to Yes to allow site admin cookies. ALLOW_SITE_ADMIN_COOKIES = No +# If the following is set to a non-zero value, web authentication cookies will +# expire that many seconds following their last use. +AUTHENTICATION_COOKIE_LIFETIME = 0 + # Command that is used to convert text/html parts into plain text. This # should output results to standard output. %(filename)s will contain the # name of the temporary file that the program should operate on. === modified file 'Mailman/SecurityManager.py' --- Mailman/SecurityManager.py 2011-04-25 22:20:53 +0000 +++ Mailman/SecurityManager.py 2011-04-25 22:42:31 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 1998-2008 by the Free Software Foundation, Inc. +# Copyright (C) 1998-2011 by the Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License @@ -224,6 +224,8 @@ for ac in authcontexts: ok = self.CheckCookie(ac, user) if ok: + # Refresh the cookie + print self.MakeCookie(ac, user) return True # Check passwords ac = self.Authenticate(authcontexts, response, user) @@ -342,6 +344,9 @@ now = time.time() if now < issued: return False + if (mm_cfg.AUTHENTICATION_COOKIE_LIFETIME and + issued + mm_cfg.AUTHENTICATION_COOKIE_LIFETIME < now): + return False # Calculate what the mac ought to be based on the cookie's timestamp # and the shared secret. mac = sha_new(secret + `issued`).hexdigest() === modified file 'NEWS' --- NEWS 2011-04-25 22:20:53 +0000 +++ NEWS 2011-04-25 22:42:31 +0000 @@ -82,6 +82,11 @@ New Features + - A new mm_cfg.py setting AUTHENTICATION_COOKIE_LIFETIME has been added. + If this is set to a non-zero value, web authentication cookies will + expire that many seconds following their last use. Its default value is + zero to preserve current behavior. + - A new mm_cfg.py setting RESPONSE_INCLUDE_LEVEL has been added to control how much of the original message is included in automatic responses to email commands. The default is 2 to preserve the prior behavior of
_______________________________________________ Mailman-checkins mailing list Mailman-checkins@python.org Unsubscribe: http://mail.python.org/mailman/options/mailman-checkins/archive%40jab.org