[Bug 881312] [NEW] Properly decode payload

Public bug reported: With mailman 3.0.0a8 in src/mailman/runners/command.py, there is an issue with body = part.get_payload(decode=True) if you send a mail to test-unsubscribe@example.com, with accents in the mail, in the signature for example, you get a body string encoded in iso-8859-1. When you try to concatenate iso-8859-1 string with unicode, this the case when the mail body with "Unprocessed:" and "Ignored:" is generated, you get a UnicodeDecodeError ascii. The code should be modified to correctly decode the mail body like it is done in src/mailman/pipeline/decorate.py mcset = msg.get_content_charset() or 'us-ascii' unicode(msg.get_payload(decode=True), mcset) There are similar issues in src/mailman/rules/administrivia.py with the line: if line == '': where it give you a warning because it compare an iso to an empty unicode. and in src/mailman/rules/approved.py where it simply crashes: Oct 18 17:54:41 2011 (18207) Traceback (most recent call last): File "/home/zope/mailman/src/mailman/core/runner.py", line 138, in _one_iteration self._process_one_file(msg, msgdata) File "/home/zope/mailman/src/mailman/core/runner.py", line 220, in _process_one_file keepqueued = self._dispose(mlist, msg, msgdata) File "/home/zope/mailman/src/mailman/runners/incoming.py", line 65, in _dispose process(mlist, msg, msgdata, mlist.start_chain) File "/home/zope/mailman/src/mailman/core/chains.py", line 68, in process if link.rule.check(mlist, msg, msgdata): File "/home/zope/mailman/src/mailman/rules/approved.py", line 81, in check if ':' in line: UnicodeDecodeError: 'ascii' codec can't decode byte 0xe0 in position 14: invalid continuation byte Currently, mailman is unusable for another language than English, like French. ** Affects: mailman Importance: Undecided Status: New -- You received this bug notification because you are a member of Mailman Coders, which is subscribed to GNU Mailman. https://bugs.launchpad.net/bugs/881312 Title: Properly decode payload To manage notifications about this bug go to: https://bugs.launchpad.net/mailman/+bug/881312/+subscriptions

** Tags added: mailman3 -- You received this bug notification because you are a member of Mailman Coders, which is subscribed to GNU Mailman. https://bugs.launchpad.net/bugs/881312 Title: Properly decode payload To manage notifications about this bug go to: https://bugs.launchpad.net/mailman/+bug/881312/+subscriptions

** Changed in: mailman Status: New => Triaged ** Changed in: mailman Importance: Undecided => High -- You received this bug notification because you are a member of Mailman Coders, which is subscribed to GNU Mailman. https://bugs.launchpad.net/bugs/881312 Title: Properly decode payload To manage notifications about this bug go to: https://bugs.launchpad.net/mailman/+bug/881312/+subscriptions

** Tags added: i18n -- You received this bug notification because you are a member of Mailman Coders, which is subscribed to GNU Mailman. https://bugs.launchpad.net/bugs/881312 Title: Properly decode payload To manage notifications about this bug go to: https://bugs.launchpad.net/mailman/+bug/881312/+subscriptions

Please Ignore this message, and any activity for next few minutes on this bug. Thi is for testing the api --maxking -- You received this bug notification because you are a member of Mailman Coders, which is subscribed to GNU Mailman. https://bugs.launchpad.net/bugs/881312 Title: Properly decode payload To manage notifications about this bug go to: https://bugs.launchpad.net/mailman/+bug/881312/+subscriptions

This bug has been moved to the new gitlab repo here: https://gitlab.com/maxking/mailman/issues/7 -- You received this bug notification because you are a member of Mailman Coders, which is subscribed to GNU Mailman. https://bugs.launchpad.net/bugs/881312 Title: Properly decode payload To manage notifications about this bug go to: https://bugs.launchpad.net/mailman/+bug/881312/+subscriptions

Please ignore the above comment, the bug has been moved here: https://gitlab.com/mailman/mailman/issues/7 -- You received this bug notification because you are a member of Mailman Coders, which is subscribed to GNU Mailman. https://bugs.launchpad.net/bugs/881312 Title: Properly decode payload To manage notifications about this bug go to: https://bugs.launchpad.net/mailman/+bug/881312/+subscriptions
participants (4)
-
Abhilash Raj
-
Barry Warsaw
-
Sumana Harihareswara
-
Vincent Fretin