[issue1466065] base64 module ignores non-alphabet characters

Antoine Pitrou report at bugs.python.org
Wed Jul 29 21:05:05 CEST 2009

Antoine Pitrou <pitrou at free.fr> added the comment:

> 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.

But having to validate input manually kinds of defeats the point of
having a decoder in the stdlib, therefore I agree with MRAB that a
validation flag would be useful.


Python tracker <report at bugs.python.org>

More information about the Python-bugs-list mailing list