[issue1466065] base64 module ignores non-alphabet characters

Neil Tallim report at bugs.python.org
Wed Jul 29 20:14:05 CEST 2009


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

RFC 3548, referenced by the base64 module's docs, has a rather different
statement on how invalid characters should be treated.

>From 2.3 Interpretation of non-alphabet characters in encoded data:
   Implementations MUST reject the encoding if it contains characters
   outside the base alphabet when interpreting base encoded data, unless
   the specification referring to this document explicitly states
   otherwise.  Such specifications may, as MIME does, instead state that
   characters outside the base encoding alphabet should simply be
   ignored when interpreting data ("be liberal in what you accept").

So it looks like we can safely just say that invalid characters are
ignored in the docs, as long as it's explicit, but that's probably not
what people will expect.


I'll add doc patches in a moment, and someone who's actually a developer
(i.e., not me) can decide whether they're good enough.

----------

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


More information about the Python-bugs-list mailing list