Digest handler crashes on non-ascii messages with no encoding header
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
GNU Mailman |
Fix Released
|
High
|
Barry Warsaw |
Bug Description
I found an interesting bug in the to_digest handler: when a message is not ascii only but has no encoding defined (which happens in the wild unfortunately), the mailbox will crash when adding the message on line 58 of handlers/
The reason is that due to the mailman-specific email.message.
The solution for that is to call the as_string() method before adding to the mailbox, it will do the serialization properly.
I'm attaching the fix (one-liner) and a testcase to reproduce it (much larger).
Related branches
- Barry Warsaw: Approve
-
Diff: 80 lines (+64/-1)2 files modifiedsrc/mailman/handlers/tests/test_to_digest.py (+63/-0)
src/mailman/handlers/to_digest.py (+1/-1)
Changed in mailman: | |
milestone: | none → 3.0.0b5 |
assignee: | nobody → Barry Warsaw (barry) |
importance: | Undecided → High |
Changed in mailman: | |
status: | New → Fix Committed |
Changed in mailman: | |
status: | Fix Committed → Fix Released |
Oops there was a typo in my patch, sorry about that. Here's the new one