aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormsapiro <>2007-03-20 23:12:18 +0000
committermsapiro <>2007-03-20 23:12:18 +0000
commit6e46e0d932be4643426d2e7f5037a29039a58207 (patch)
tree7b8024a03767b6235dac3c091fa2936a246b5ad0
parent329a23cb28d87ed14627bf7a59b64e57ac594666 (diff)
downloadmailman2-6e46e0d932be4643426d2e7f5037a29039a58207.tar.gz
mailman2-6e46e0d932be4643426d2e7f5037a29039a58207.tar.xz
mailman2-6e46e0d932be4643426d2e7f5037a29039a58207.zip
- Fixed a bug in OldStyleMemberships.addNewMember that allowed adding an address
with upper case in the domain if the local part was all lower case. - Changed the semantics of OldStyleMemberships.changeMemberAddress os that in the case of a straightforward address change, i.e. nodelete = 0, delivery status and time are preserved if BYUSER or BYADMIN.
-rw-r--r--Mailman/OldStyleMemberships.py14
-rw-r--r--NEWS4
2 files changed, 15 insertions, 3 deletions
diff --git a/Mailman/OldStyleMemberships.py b/Mailman/OldStyleMemberships.py
index 3222c2ae..f28c08db 100644
--- a/Mailman/OldStyleMemberships.py
+++ b/Mailman/OldStyleMemberships.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2001-2003 by the Free Software Foundation, Inc.
+# Copyright (C) 2001-2007 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
@@ -12,7 +12,8 @@
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+# USA.
"""Old style Mailman membership adaptor.
@@ -201,7 +202,7 @@ class OldStyleMemberships(MemberAdaptor.MemberAdaptor):
value = 0
else:
value = member
- member = member.lower()
+ member = member.lower()
if digest:
self.__mlist.digest_members[member] = value
else:
@@ -243,6 +244,8 @@ class OldStyleMemberships(MemberAdaptor.MemberAdaptor):
password = self.__mlist.passwords.get(memberkey,
Utils.MakeRandomPassword())
lang = self.getMemberLanguage(memberkey)
+ delivery = self.__mlist.delivery_status.get(member.lower(),
+ (MemberAdaptor.ENABLED,0))
# First, possibly delete the old member
if not nodelete:
self.removeMember(memberkey)
@@ -252,6 +255,11 @@ class OldStyleMemberships(MemberAdaptor.MemberAdaptor):
# Set the entire options bitfield
if flags:
self.__mlist.user_options[newaddress.lower()] = flags
+ # If this is a straightforward address change, i.e. nodelete = 0,
+ # preserve the delivery status and time if BYUSER or BYADMIN
+ if delivery[0] in (MemberAdaptor.BYUSER, MemberAdaptor.BYADMIN)\
+ and not nodelete:
+ self.__mlist.delivery_status[newaddress.lower()] = delivery
def setMemberPassword(self, memberkey, password):
assert self.__mlist.Locked()
diff --git a/NEWS b/NEWS
index 4b695d69..10e4d063 100644
--- a/NEWS
+++ b/NEWS
@@ -14,6 +14,10 @@ Here is a history of user visible changes to Mailman.
list's admin or moderator password and to accept the password if the
roster is public.
+ - Changed OldStyleMemberships.py to preserve delivery statuses BYADMIN
+ and BYUSER on a straight change of address. Also fixed a bug that
+ could result in a member key with uppercase in the domain.
+
2.1.9 (12-Sep-2006)
Security