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 frispete
Recipients barry, frispete, r.david.murray
Date 2016-06-07.19:14:40
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1465326886.85.0.738328133832.issue27256@psf.upfronthosting.co.za>
In-reply-to
Content
In the course of replacing an old Python 2.7 email filter tool with a rewritten Python3 version, I stumbled across a ugly case, where such an header:

X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtCTDJQUjAyTUI1MTQ7MjM6bEtRRlNaUHQvVTk5WCttdktlOUVrUGQvVFBH?=
 =?utf-8?B?cDFJemVUeXFzOGNzYnZOYWlwMDZpR0YzbXZyY09WaTBKM2pkeUl4S1VDMkxw?=
 =?utf-8?B?eVRkNWthRW9waUhJTzczTWd5WDZOQ3hMNU1haGFvQTVzVTdRZmxJUnZlblpW?=
 ...

is regenerated as:

X-Microsoft-Exchange-Diagnostics:
 1;BL2PR02MB514;23:lKQFSZPt/U99X+mvKe9EkPd/TPG
p1IzeTyqs8csbvNaip06iGF3mvrcOVi0J3jdyIxKUC2Lp
yTd5kaEopiHIO73MgyX6NCxL5MahaoA5sU7QflIRvenZV

which is plain wrong of course.

I'm using email.message_from_binary_file for parsing and BytesGenerator.flatten for regeneration. Since those are LKML public mails, I'm attaching both versions.

I'm using 3.4.4, but also the email module from current hg for testing.
History
Date User Action Args
2016-06-07 19:14:48frispetesetrecipients: + frispete, barry, r.david.murray
2016-06-07 19:14:46frispetesetmessageid: <1465326886.85.0.738328133832.issue27256@psf.upfronthosting.co.za>
2016-06-07 19:14:46frispetelinkissue27256 messages
2016-06-07 19:14:46frispetecreate