> >>> import base64
> >>> base64.decodestring('w/==')
> '\xc3'
>
> Now, imagine, what kind of debugging hell the above bug entailed.

on the other hand:

>>> base64.encodestring("\xc3")
'ww==\n'

so it's really the encoder that's broken.

unless I'm mistaken, the "w/==" string use the wrong padding (ones in-
stead of zeros), and the relevant RFC doesn't specify how to deal with
that situation.  as far as the specification is concerned, the decoder is
free to do whatever it wants when it gets bogus data.

(as for the "this is not 1.0" argumentation, I think you're all overestimating
how well Python is specified.  different CPython releases aren't even com-
patible with themselves on things like this, so it's a bit naive to expect an
independent implementation to be compatible at a bug-by-bug level)

</F>
_______________________________________________
users mailing list
[email protected]
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

Reply via email to