diff options
| author | bwarsaw | 2003-06-17 15:58:38 +0000 |
|---|---|---|
| committer | bwarsaw | 2003-06-17 15:58:38 +0000 |
| commit | 80c6ad3ee73bf41b597f81f72fb6675b586fadf4 (patch) | |
| tree | 45742a65772acc645aad348deb3515d1821526fe /Mailman | |
| parent | 0f6442bc88ee220cc86dae2cf9aa938f15c6a8c1 (diff) | |
| download | mailman-80c6ad3ee73bf41b597f81f72fb6675b586fadf4.tar.gz mailman-80c6ad3ee73bf41b597f81f72fb6675b586fadf4.tar.zst mailman-80c6ad3ee73bf41b597f81f72fb6675b586fadf4.zip | |
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.
Diffstat (limited to 'Mailman')
| -rw-r--r-- | Mailman/Cgi/admin.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Mailman/Cgi/admin.py b/Mailman/Cgi/admin.py index 17b3919ff..949689c2b 100644 --- a/Mailman/Cgi/admin.py +++ b/Mailman/Cgi/admin.py @@ -794,7 +794,9 @@ def membership_options(mlist, subcat, cgidata, doc, form): # 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() |
