------------------------------------------------------------
revno: 1295
committer: Mark Sapiro <[email protected]>
branch nick: 2.1
timestamp: Mon 2011-04-25 15:40:16 -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.1
https://code.launchpad.net/~mailman-coders/mailman/2.1
Your team Mailman Checkins is subscribed to branch lp:mailman/2.1.
To unsubscribe from this branch go to
https://code.launchpad.net/~mailman-coders/mailman/2.1/+edit-subscription
=== modified file 'Mailman/Defaults.py.in'
--- Mailman/Defaults.py.in 2011-02-07 19:59:23 +0000
+++ Mailman/Defaults.py.in 2011-04-25 22:40:16 +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:18:56 +0000
+++ Mailman/SecurityManager.py 2011-04-25 22:40:16 +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:18:56 +0000
+++ NEWS 2011-04-25 22:40:16 +0000
@@ -12,6 +12,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
[email protected]
Unsubscribe:
http://mail.python.org/mailman/options/mailman-checkins/archive%40jab.org