I'm running Mailman 2.1.8 and have encountered a problem with email addresses starting with underscores.
Using a python script to show list members, the first three members of a list are:
6louisc@example.com _santasal@example.com a1bformk@example.com
Using mailman's admin interface, web page
http://localhost/mailman/admin/mylist/members
has the following:
219 members total, 1 shown [6] A B C D E F G H I J K L M N O P Q R S T U V W Y Z
Note that the script shows a user whose name begins with an underscore but the admin interface indicates names beginning with "6" and "A" but none with "_".
Is there a patch that fixes this? If not, I'll create one if somebody can point me towards the admin module that determines the "6ABC..." list above?
Regards,
David
David Relson wrote;
I'm running Mailman 2.1.8 and have encountered a problem with email addresses starting with underscores.
Using a python script to show list members, the first three members of a list are:
6louisc@example.com _santasal@example.com a1bformk@example.com
Using mailman's admin interface, web page
http://localhost/mailman/admin/mylist/members
has the following:
219 members total, 1 shown [6] A B C D E F G H I J K L M N O P Q R S T U V W Y Z
Note that the script shows a user whose name begins with an underscore but the admin interface indicates names beginning with "6" and "A" but none with "_".
Is there a patch that fixes this? If not, I'll create one if somebody can point me towards the admin module that determines the "6ABC..." list above?
Thanks for the report. This bug still exists in 2.1.11. The following patch is totally untested, but I think it will fix it for '_'. I'll have to think about other non-alphanumeric characters. At least it will point to the right place in the code. Note that if you know there is an address with a leading '_', you can display it with a find pattern of '^_', but this doesn't help if you don't know. Also, if you didn't have the '6' address, the '_' address would display on the default page. Here's the patch: --- Mailman/Cgi/admin.py 2007-05-08 03:16:04 +0000 +++ Mailman/Cgi/admin.py 2008-07-27 15:33:11 +0000 @@ -902,7 +902,7 @@ if qsenviron: qs = cgi.parse_qs(qsenviron) bucket = qs.get('letter', 'a')[0].lower() - if bucket not in digits + lowercase: + if bucket not in digits + '_' + lowercase: bucket = None if not bucket or not buckets.has_key(bucket): keys = buckets.keys() @@ -942,7 +942,7 @@ # Add the alphabetical links if bucket: cells = [] - for letter in digits + lowercase: + for letter in digits + '_' + lowercase: if not buckets.get(letter): continue url = adminurl + '/members?letter=%s' % letter -- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Mark Sapiro wrote:
Thanks for the report. This bug still exists in 2.1.11. The following patch is totally untested, but I think it will fix it for '_'. I'll have to think about other non-alphanumeric characters. At least it will point to the right place in the code.
Here's a better patch. It has been lightly tested, and will work for any non-alphanumeric characters. --- Mailman/Cgi/admin.py 2007-05-08 03:16:04 +0000 +++ Mailman/Cgi/admin.py 2008-07-28 00:17:06 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 1998-2007 by the Free Software Foundation, Inc. +# Copyright (C) 1998-2008 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 @@ -28,7 +28,6 @@ import urllib import signal from types import * -from string import lowercase, digits from email.Utils import unquote, parseaddr, formataddr @@ -901,12 +900,10 @@ qsenviron = os.environ.get('QUERY_STRING') if qsenviron: qs = cgi.parse_qs(qsenviron) - bucket = qs.get('letter', 'a')[0].lower() - if bucket not in digits + lowercase: - bucket = None + bucket = qs.get('letter', '0')[0].lower() + keys = buckets.keys() + keys.sort() if not bucket or not buckets.has_key(bucket): - keys = buckets.keys() - keys.sort() bucket = keys[0] members = buckets[bucket] action = adminurl + '/members?letter=%s' % bucket @@ -942,7 +939,7 @@ # Add the alphabetical links if bucket: cells = [] - for letter in digits + lowercase: + for letter in keys: if not buckets.get(letter): continue url = adminurl + '/members?letter=%s' % letter -- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Mark Sapiro wrote:
Mark Sapiro wrote:
Thanks for the report. This bug still exists in 2.1.11. The following patch is totally untested, but I think it will fix it for '_'. I'll have to think about other non-alphanumeric characters. At least it will point to the right place in the code.
Here's a better patch. It has been lightly tested, and will work for any non-alphanumeric characters.
--- Mailman/Cgi/admin.py 2007-05-08 03:16:04 +0000 +++ Mailman/Cgi/admin.py 2008-07-28 00:17:06 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 1998-2007 by the Free Software Foundation, Inc. +# Copyright (C) 1998-2008 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 <snip>
Somehow the indentation got garbled in the patch in the last post. The lines without leading + or - are indented an extra space. This time I have attached the patch as the file admin.patch.txt. The patch is the same, but should be properly indented in the attachment. -- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
On Sun, 27 Jul 2008 18:36:09 -0700 Mark Sapiro wrote:
Mark Sapiro wrote:
Mark Sapiro wrote:
Thanks for the report. This bug still exists in 2.1.11. The following patch is totally untested, but I think it will fix it for '_'. I'll have to think about other non-alphanumeric characters. At least it will point to the right place in the code.
Here's a better patch. It has been lightly tested, and will work for any non-alphanumeric characters.
--- Mailman/Cgi/admin.py 2007-05-08 03:16:04 +0000 +++ Mailman/Cgi/admin.py 2008-07-28 00:17:06 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 1998-2007 by the Free Software Foundation, Inc. +# Copyright (C) 1998-2008 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 <snip>
Somehow the indentation got garbled in the patch in the last post. The lines without leading + or - are indented an extra space. This time I have attached the patch as the file admin.patch.txt. The patch is the same, but should be properly indented in the attachment.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Mark, The patch works like a charm! Two of my lists had "_SubscriberName@example.com" entries. With the "hidden" first character, different SubscriberNames and the same company names, the suspicion is of a spammer harvesting reply addresses. The "_" entries are now unsubscribed. Thank You! David
participants (2)
-
David Relson
-
Mark Sapiro