XMLRPC: wp.uploadFile missing base64_decode
|Reported by:||fishc4ke||Owned by:|
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 );
@fwrite( $ifp, base64_decode($bits) );
However, I have not tested to see if this would break any other functionality.