This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author msapiro
Recipients barry, maciej.szulik, msapiro, r.david.murray
Date 2016-06-14.22:54:21
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1465944861.88.0.0753435942904.issue27321@psf.upfronthosting.co.za>
In-reply-to
Content
One additional observation. The original message contained no Content-Transfer-Encoding header even though the message body was raw koi8-r characters. Adding

Content-Transfer-Encoding: 8bit

to the message headers avoids the issue, but that is not a practical solution as the message was Russian spam received by a Mailman list and the resultant KeyError caused problems in Mailman.

We can work on defending against this in Mailman, but I suggest that the munge_cte code in generator._write() avoid the documented possible KeyError raised by replace_header() by using __delitem__() and __setitem__() instead as in the attached generator.patch.
History
Date User Action Args
2016-06-14 22:54:21msapirosetrecipients: + msapiro, barry, r.david.murray, maciej.szulik
2016-06-14 22:54:21msapirosetmessageid: <1465944861.88.0.0753435942904.issue27321@psf.upfronthosting.co.za>
2016-06-14 22:54:21msapirolinkissue27321 messages
2016-06-14 22:54:21msapirocreate