[ mailman-Bugs-913397 ] Subscriber E-Mail-Address: GlobalChange causes removal

SourceForge.net noreply at sourceforge.net
Wed Jul 21 08:30:23 CEST 2004


Bugs item #913397, was opened at 2004-03-10 05:53
Message generated for change (Comment added) made by edentz
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=100103&aid=913397&group_id=103

Category: None
Group: 2.1 (stable)
Status: Open
Resolution: None
Priority: 5
Submitted By: chris-taylor (chris-taylor)
Assigned to: Nobody/Anonymous (nobody)
Summary: Subscriber E-Mail-Address: GlobalChange causes removal 

Initial Comment:
A subscriber of some mailinglists on my site tried to
change his email address globally. The change for one
of the lists only affected  a correction of upper- and
lower-case letters in the local part of the
address(e.g. will.smith at ... -> Will.Smith at ....). 
After confirming the change an error occured and the
subscriber was completely unsubscribed from the list.
Neither the old address nor the new address were
registered in the subscribers list.


----------------------------------------------------------------------

Comment By: Eirik Dentz (edentz)
Date: 2004-07-21 02:30

Message:
Logged In: YES 
user_id=878352

Here is a patch against the 2.1.5 Mailman release:

--- mailman-2.1.5/Mailman/MailList.py   2004-03-04 06:10:28.000000000 
-0800
+++ mailman-2.1.5.patch/Mailman/MailList.py     2004-07-20 23:17:
09.000000000 -0700
@@ -1081,7 +1081,7 @@
         # It's possible they were a member of this list, but choose to 
change
         # their membership globally.  In that case, we simply remove the 
old
         # address.
-        if self.isMember(newaddr):
+        if self.getMemberCPAddress(oldaddr) == newaddr:
             self.removeMember(oldaddr)
         else:
             self.changeMemberAddress(oldaddr, newaddr)
@@ -1101,7 +1101,7 @@
             mlist.Lock()
             try:
                 # Same logic as above, re newaddr is already a member
-                if mlist.isMember(newaddr):
+                if mlist.getMemberCPAddress(oldaddr) == newaddr:
                     mlist.removeMember(oldaddr)
                 else:
                     mlist.changeMemberAddress(oldaddr, newaddr)


----------------------------------------------------------------------

Comment By: Eirik Dentz (edentz)
Date: 2004-07-21 01:50

Message:
Logged In: YES 
user_id=878352

I encountered this bug too. It doesn't look like it is fixed
in 2.1.5 or CVS yet so I did a bit of searching through the
Mailman source code and found the part(s) that causes the
deletion of the member when attempting to change the case of
the localpart of the email address. Lines 332 - 341 of
Mailman/Cgi/options.py pass the global change address off
and the actual deletion occurs in the
ApprovedChangeMemberAddress() method in Mailman/MailList.py.
If you change the first if statement in that method (should
be line 1050 in Mailman version 2.1.4)
from:
if self.isMember(newaddr):
to:
if self.getMemberCPAddress(oldaddr) == newaddr:

And then the last if statement (should be line 1070 in
Mailman version 2.1.4) in the method
from:
if mlist.isMember(newaddr):
to:
if mlist.getMemberCPAddress(oldaddr) == newaddr:

It should fix the bug. However I haven't tested this
extensively and it may break other functionality. 

Eirik

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=100103&aid=913397&group_id=103


More information about the Mailman-coders mailing list