]> granicus.if.org Git - python/commit
#3196: if needed pad a short base64 encoded word before trying to decode.
authorR. David Murray <rdmurray@bitdance.com>
Tue, 3 Aug 2010 22:14:10 +0000 (22:14 +0000)
committerR. David Murray <rdmurray@bitdance.com>
Tue, 3 Aug 2010 22:14:10 +0000 (22:14 +0000)
commitc4e69cc1d84a8e025c6b1894b4749cda8bb1d156
tree586e2b0cb340e1107e34f9e85217055dffc5a350
parentdf7f2fd350c215d15faf14ed01838ae3420ac0ae
#3196: if needed pad a short base64 encoded word before trying to decode.

The RFCs encourage following Postel's law: be liberal in what you accept.
So if someone forgot to pad the base64 encoded word payload to an
even four bytes, we add the padding before handing it to base64mime.decode.
Previously, missing padding resulted in a HeaderParseError.

Patch by Jason Williams.
Lib/email/header.py
Lib/email/test/test_email.py
Misc/ACKS
Misc/NEWS