[issue12489] email.errors.HeaderParseError if base64url is used

Christian Theune report at bugs.python.org
Thu Apr 17 16:31:55 CEST 2014


Christian Theune added the comment:

So, in addition to "+/" and "-_" there are quite a few base64 variants. Worst thing: there are the two ambigious variants "-_" and "_-", even though "_-" supposedly is "non-standard" for its use.

See http://en.wikipedia.org/wiki/Base64

The shortest fix I can see would be to not use binascii directly from the email module but go through the base64 module (as pointed out by the blogpost) and call the urlsafe version. That should catch both cases.

Preparing a patch right now.

----------
nosy: +ctheune, r.david.murray

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue12489>
_______________________________________


More information about the Python-bugs-list mailing list