Author jasonjwwilliams
Recipients jasonjwwilliams
Date 2008-06-21.23:58:54
SpamBayes Score 0.18146
Marked as misclassified No
Message-id <1214092738.57.0.399756790289.issue3169@psf.upfronthosting.co.za>
In-reply-to
Content
email/header.py:decode_header() Line 95: dec = 
email.base64mime.decode(encoded)

Headers that contain Subject or From headers which are Base64 encoded 
and are insufficiently padded raise a HeaderParseError. The actual 
padding error is begin generated in binascii.a2b_base64 and bubbling up 
as a HeaderParseError in header.py. 

decode_header() should detect the padding error (Base64 text length does 
not evenly divide by 3) and automatically add padding before handing off 
to a2b_base64. The problem usually occurs with spam.

Example problem header:
Subject: =?iso-8859-1?B?
UHJldmVudCBGb3JlY2xvc3VyZSAmIFNhdmUgWW91ciBIb21lIA=?=


Properly Padded:
Subject: =?iso-8859-1?B?
UHJldmVudCBGb3JlY2xvc3VyZSAmIFNhdmUgWW91ciBIb21lIA==?=
History
Date User Action Args
2008-06-21 23:58:59jasonjwwilliamssetspambayes_score: 0.18146 -> 0.18146
recipients: + jasonjwwilliams
2008-06-21 23:58:58jasonjwwilliamssetspambayes_score: 0.18146 -> 0.18146
messageid: <1214092738.57.0.399756790289.issue3169@psf.upfronthosting.co.za>
2008-06-21 23:58:56jasonjwwilliamslinkissue3169 messages
2008-06-21 23:58:55jasonjwwilliamscreate