[wp-xmlrpc] base64_decode missing in metaWeblog.newMediaObject
Daniel Jalkut
jalkut at red-sweater.com
Tue Dec 30 17:56:17 GMT 2008
Joseph - I suspect what is happening here is that the afflicted users
are not enclosing their "bits" in a <base64> tag. MarsEdit, and I
suspect every other client that currently works, puts the data in such
a tag, which causes your XMLRPC parser to do the base64 decoding
automatically:
wp-includes/class-IXR.php
See line 241.
So it would be dangerous to take their patch because any clients that
currently embed the bits explicitly in a <base64> node will have had
their bits already decoded.
Daniel
On Dec 30, 2008, at 12:47 PM, Daniel Jalkut wrote:
> What I'm naturally concerned with is, if the bits were not being
> decoded from base64 already, then how on earth are file uploads
> working for all existing clients?
>
> I suspect something else in the chain is magically decoding the
> base64. Possibly a php feature that is just not working right for
> the afflicted user who proposed this patch?
>
> Daniel
>
> On Dec 30, 2008, at 12:15 PM, Joseph Scott wrote:
>
>>
>> It was pointed out to me (http://garrickvanburen.com/archive/wordpress-27-xmlrpcphp-monkey-patches
>> and http://www.kgarner.com/blog/archives/2008/06/06/small-fix-for-wordpress-xml-rpc/)
>> that in metaWeblog.newMediaObject WordPress is not decoding the
>> bits field as base64, which is what the spec indicates it should
>> be: http://www.xmlrpc.com/metaWeblogNewMediaObject. I'm happy to
>> push for this fix to go into WordPress, but wanted to get some
>> feedback first since the code has been missing this for at least 2
>> years.
>>
>> --
>> Joseph Scott
>> joseph at josephscott.org
>> http://josephscott.org/
>>
>>
>>
>>
>> _______________________________________________
>> wp-xmlrpc mailing list
>> wp-xmlrpc at lists.automattic.com
>> http://lists.automattic.com/mailman/listinfo/wp-xmlrpc
>
> _______________________________________________
> wp-xmlrpc mailing list
> wp-xmlrpc at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-xmlrpc
More information about the wp-xmlrpc
mailing list