[issue1466065] base64 module ignores non-alphabet characters

R. David Murray report at bugs.python.org
Mon Nov 8 22:29:52 CET 2010


R. David Murray <rdmurray at bitdance.com> added the comment:

Here is an updated patch that addresses the concerns I noted.  I modified the tests: given that I've changed the code to raise binascii.Error as discussed, we don't really care from an API point of view what the error text is, just that the error is raised in the cases given.  Nor do we care (again, from an API point of view) if the first error detected is the invalid character or the invalid padding.  

I made the new test test the validate=False case, so all of the invalid character tests are now correctly padded if you ignore the invalid characters.

----------
Added file: http://bugs.python.org/file19548/binascii-validate.patch

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


More information about the Python-bugs-list mailing list