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

SourceForge.net noreply at sourceforge.net
Tue Oct 19 06:37:06 CEST 2004


Bugs item #913397, was opened at 2004-03-10 10:53
Message generated for change (Settings changed) made by tkikuchi
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: Closed
Resolution: None
Priority: 5
Submitted By: chris-taylor (chris-taylor)
Assigned to: Tokio Kikuchi (tkikuchi)
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: Tokio Kikuchi (tkikuchi)
Date: 2004-10-19 04:37

Message:
Logged In: YES 
user_id=67709

fixed in MailList.py revision: 2.100.2.23


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

Comment By: Eirik Dentz (edentz)
Date: 2004-07-21 06: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 05: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