[issue1466065] base64 module ignores non-alphabet characters

Neil Tallim report at bugs.python.org
Wed Jul 29 20:53:26 CEST 2009


Neil Tallim <red.hamsterx at gmail.com> added the comment:

It isn't written that only MIME may ignore such content. The key terms
there are 'may' and 'explicitly states otherwise'.

If the documentation is clear, then all future application developers
will know to check for validity using a regular expression like
'^[A-Za-z0-9+/\r\n]+={0,2}$'. Any existing applications in which
validity matters should already have a similar workaround.

While I do agree that standards are always good and that workarounds are
bad, Guido does have a very valid point: "changing it to
insist on valid input would break some use cases", and I think we
already missed the 2.x -> 3.x window where that would have been acceptable.

----------

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


More information about the Python-bugs-list mailing list