Update of /cvsroot/mailman/mailman/Mailman/Cgi
In directory sc8-pr-cvs1:/tmp/cvs-serv26898

Modified Files:
        admin.py 
Log Message:
membership_options(): Email addresses must be us-ascii, but it's
possible they got into the database as Unicode objects instead of
string objects.  So before processing the address for the membership
management pages, encode them all to ascii (note that we're /not/
talking about the realnames).

This will still crash if there are non-ascii characters in the email
address, but as that is illegal, it should never happen <wink>.

Closes SF # 755188.

Back port candidate.


Index: admin.py
===================================================================
RCS file: /cvsroot/mailman/mailman/Mailman/Cgi/admin.py,v
retrieving revision 2.88
retrieving revision 2.89
diff -u -d -r2.88 -r2.89
--- admin.py    11 Feb 2003 05:49:47 -0000      2.88
+++ admin.py    17 Jun 2003 15:58:38 -0000      2.89
@@ -794,7 +794,9 @@
     # If there are more members than allowed by chunksize, then we split the
     # membership up alphabetically.  Otherwise just display them all.
     chunksz = mlist.admin_member_chunksize
-    all = mlist.getMembers()
+    # The email addresses had /better/ be ASCII, but might be encoded in the
+    # database as Unicodes.
+    all = [_m.encode() for _m in mlist.getMembers()]
     all.sort(lambda x, y: cmp(x.lower(), y.lower()))
     # See if the query has a regular expression
     regexp = cgidata.getvalue('findmember', '').strip()



_______________________________________________
Mailman-checkins mailing list
[EMAIL PROTECTED]
http://mail.python.org/mailman/listinfo/mailman-checkins

Reply via email to