Share

Redstone XML-RPC Library

Tracker: Bugs

5 Parse error on MIME-style base64 - ID: 1753822
Last Update: Comment added ( sf-robot )

Redstone apparently expects base64 data to have no newlines, as per RFC
4648 (http://tools.ietf.org/html/rfc4648#section-3.1 ) or 3548 (
http://tools.ietf.org/html/rfc3548#section-2.1 ).

However, when the xmlrpc spec was written (1999), those RFCs did not exist.
The common specification for base64 at the time was MIME (see
http://tools.ietf.org/html/rfc2045#section-6.8 ), which specifies a newline
every 76 characters.

Therefore, it seems reasonable for an xmlrpc implementation to follow the
MIME spec and insert newlines in base64 data. For example, Python's
xmlrpclib does this... here's an example:
http://pastebin.com/f523206e2

If Redstone receives base64 data with newlines, it raises an exception like
the attached.

This is understandable given the vagueness of the xmlrpc spec, but bad for
interoperability. Unless the xmlrpc spec is updated to clarify which base64
spec is intended, you should assume that some implementations will follow
the MIME spec.


Paul Winkler ( slinkp ) - 2007-07-13 22:40

5

Closed

Fixed

Greger Ohlson

None

None

Public


Comments ( 5 )




Date: 2007-08-14 02:20
Sender: sf-robotSourceForge.net Site Admin


This Tracker item was closed automatically by the system. It was
previously set to a Pending status, and the original submitter
did not respond within 14 days (the time period specified by
the administrator of this Tracker).


Date: 2007-07-30 23:00
Sender: gregerohlsonProject Admin


The head revision in the SVN repository contains a fixed Base64.decode()
which accepts BASE64-encoded data which contains newline characters and
other non-BASE64 data. It has been tested with sample output from Base64
encoders from Python, Perl, and other libraries and it appears to be
working. We will do some more testing against actual XML-RPC services on
the Internet to verify it didn't break anything but we expect no problems.
After that we will release an official bug fix of the library (in a day or
so).


Date: 2007-07-30 22:02
Sender: gregerohlsonProject Admin


OK thanks! We'll look into it directly. We've been on holidays here in
Sweden so we've just learned about this.


Date: 2007-07-16 15:40
Sender: slinkpAccepting Donations


See also http://tech.groups.yahoo.com/group/xml-rpc/message/6652
"I have just looked at the Redstone Bas64 decoder and it's obviously
broken. The code correctly ignores whitespace characters but then
complains that the data is too short."


See also http://effbot.org/zone/xmlrpc-errata.htm : "It's okay to split
base64-data over multiple lines."




Date: 2007-07-13 22:48
Sender: slinkpAccepting Donations


I just posted a relevant message to the xmlrpc mailing list... we'll see
what they have to say, if anything.
http://tech.groups.yahoo.com/group/xml-rpc/message/6650


Log in to comment.




Attached File ( 1 )

Filename Description Download
redstone_traceback.txt redstone stack trace Download

Changes ( 7 )

Field Old Value Date By
close_date 2007-07-30 23:00 2007-08-14 02:20 sf-robot
status_id Pending 2007-08-14 02:20 sf-robot
resolution_id None 2007-07-30 23:00 gregerohlson
close_date - 2007-07-30 23:00 gregerohlson
status_id Open 2007-07-30 23:00 gregerohlson
assigned_to nobody 2007-07-30 22:02 gregerohlson
File Added 236938: redstone_traceback.txt 2007-07-13 22:40 slinkp