[wp-trac] [WordPress Trac] #20984: XMLRPC: wp.uploadFile missing base64_decode
WordPress Trac
wp-trac at lists.automattic.com
Fri Jun 15 21:57:16 UTC 2012
#20984: XMLRPC: wp.uploadFile missing base64_decode
--------------------------+-----------------------------
Reporter: fishc4ke | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: XML-RPC | Version: 3.4
Severity: normal | Keywords:
--------------------------+-----------------------------
Uploading images via wp.uploadFile results in a broken image as the base64
bits are not decoded again.
Looking at the code, the file is written to disk by the function
wp_upload_bits in functions.php.
A fix would be to alter line 1615 of functions.php:
{{{
@fwrite( $ifp, $bits );
}}}
to
{{{
@fwrite( $ifp, base64_decode($bits) );
}}}
However, I have not tested to see if this would break any other
functionality.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/20984>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list