Merge lp:~black-perl/mailman/handling-special-chars-in-email into lp:mailman

Proposed by Ankush Sharma on 2015-03-13
Status: Rejected
Rejected by: Barry Warsaw on 2015-05-12
Proposed branch: lp:~black-perl/mailman/handling-special-chars-in-email
Merge into: lp:mailman
Diff against target: 22 lines (+4/-1)
1 file modified
src/mailman/rest/ (+4/-1)
To merge this branch: bzr merge lp:~black-perl/mailman/handling-special-chars-in-email
Reviewer Review Type Date Requested Status
Barry Warsaw 2015-03-13 Needs Fixing on 2015-05-12
Review via email:

Description of the change

In case the mailman-client percent encodes any special character appeared in the list_id's or fqdn_listname's, the REST server should be able to decode it back. Added decoding support for it.
As discussed here:
Now mailman can also use emails with special characters [1] which earlier caused postorius to crash as discussed in the linked bug report.

[1] :

To post a comment you must log in.
Barry Warsaw (barry) wrote :

Could you please add a test for this case, and port your branch over to gitlab:


review: Needs Fixing
Ankush Sharma (black-perl) wrote :

Actually, discussed the bug with florianf. The endoded endpoint has to be decoded on the "core" end and therefore I did the patch in mailman-core. But, later I get to know that Falcon is smart and automatically decodes any encoded character in the URL. Therefore, I guess the "core" patch can be closed.

Barry Warsaw (barry) wrote :


Unmerged revisions

7304. By black-perl <email address hidden> on 2015-03-13

Added decoding support for the list identifier as per the fix for the issue #1429366.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'src/mailman/rest/'
--- src/mailman/rest/ 2015-02-13 08:13:06 +0000
+++ src/mailman/rest/ 2015-03-13 09:28:31 +0000
@@ -23,6 +23,7 @@
25import falcon25import falcon
26import urllib.parse
27from base64 import b64decode28from base64 import b64decode
28from mailman.config import config29from mailman.config import config
@@ -192,7 +193,9 @@
192 else:193 else:
193 # list-id is preferred, but for backward compatibility,194 # list-id is preferred, but for backward compatibility,
194 # fqdn_listname is also accepted.195 # fqdn_listname is also accepted.
195 list_identifier = segments.pop(0)196 enc_list_identifier = segments.pop(0)
197 # decoding the percent encoded list_identifier
198 list_identifier = urllib.parse.unquote(enc_list_identifier)
196 return AList(list_identifier), segments199 return AList(list_identifier), segments
198 @child()201 @child()