Message267732
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. |
|
Date |
User |
Action |
Args |
2016-06-07 19:14:48 | frispete | set | recipients:
+ frispete, barry, r.david.murray |
2016-06-07 19:14:46 | frispete | set | messageid: <1465326886.85.0.738328133832.issue27256@psf.upfronthosting.co.za> |
2016-06-07 19:14:46 | frispete | link | issue27256 messages |
2016-06-07 19:14:46 | frispete | create | |
|