[s-xml-rpc-devel] Re: Incorrect decoding of XML RPC messages

Sven Van Caekenberghe sven at beta9.be
Wed Apr 19 10:51:47 UTC 2006


On 18 Apr 2006, at 06:56, Alain Picard wrote:

> Okay -- I've got a fix which ensures that things
> like "<data>  </data>" decode as NIL, instead of " ".
>
> Here are the diffs, in case you want to have a look
> and/or fold them in.
>
>
> The gist of it now is that if you're inside a <value>,
> you always get a string if the inner type is not specified,
> since the spec says:
>   "If no type is indicated, the type is string."
>
> Thus "<value></value>" now decodes as "".
>
> I also fixed what I think is a bug in that
> (encode-xml-rpc-value T) ==> "T" instead of <boolean>1</boolean>.
> (same for NIL).
>
> <diff>

Alain,

I tried to integrate your changes; I didn't take over the special  
variable: it felt less elegant and I think I managed to solve all  
your problems without it. I took over most of your code though:  
thanks! I added a number of extra test cases to test-xml-rpc.lisp to  
cover all the problems that you reported. Have a look at it and tell  
me if this works for you. This is the official change log entry (all  
changes were commit but not yet released as tarball):

	* changes due to reporting and initial fixes by Alain Picard
	* added support for whitespace handling
	* iso8601->universal-time now accepts leading & trailing whitespace
	* encode-xml-rpc-value now encodes t and nil correctly as boolean 1  
and 0
	* parsing doubles (using read-from-string) with reader macros  
disabled for security
	* decode-xml-rpc now handles whitespace more correctly in <data> and  
<value> tags
	* added several test cases and fixed older stop-server problem

I enclosed a context diff here for your convenience.

Sven

-------------- next part --------------
A non-text attachment was scrubbed...
Name: ap-changes.diff
Type: application/octet-stream
Size: 4291 bytes
Desc: not available
URL: <https://mailman.common-lisp.net/pipermail/s-xml-rpc-devel/attachments/20060419/0268a596/attachment.obj>
-------------- next part --------------



More information about the S-xml-rpc-devel mailing list