Make WordPress Core

Opened 17 years ago

Closed 15 years ago

Last modified 15 years ago

#679 closed defect (bug) (worksforme)

Uploading a file with metaweblog protocol xmlrpc leads to corrupted image uploaded

Reported by: anonymousbugger Owned by: matt
Milestone: Priority: normal
Severity: major Version: 2.0.4
Component: XML-RPC Keywords:
Focuses: Cc:


When uploading a file to the blog with xmlrpc-metaweblog protocol, it is reqested to base64-encode the image in the 'bits' field.

With the code in 1.2.2 release the string isn't base64-decoded and so the saved file on server is in fact the base64 encoded string.

To fix that problem I did :
xmlrpc.php:line 1697

$bits = $datastructbits?;
$bits = base64_decode(trim($bits));

Then everythings work fine...

Hope it helps !

Change History (7)

#1 @anonymousbugger
17 years ago

  • Patch set to No

#2 @matt
17 years ago

  • fixed_in_version set to 1.5
  • Owner changed from anonymous to matt
  • Resolution changed from 10 to 20
  • Status changed from new to closed

#3 @pzi
15 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened
  • Version changed from 1.2.2 to 2.0.4

Version 2.0.4 also does not decode the uploaded file. The following fix works:

xmlrpc.php line 845:

$bits = base64_decode(trim($databits?));

#4 @foolswisdom
15 years ago

Hi anonymousbugger, pzi,

For confirming and verifying this bug, what tools include uploading files with metaweblog protocol xmlrpc?

#5 @foolswisdom
15 years ago

  • Resolution set to worksforme
  • Status changed from reopened to closed

Closing bug WORKSFORME without testing.

My guess is ecto has this functionality, and based on this post:
WordPress 2.0.1 fixes all the issues file upload.

#6 @foolswisdom
15 years ago

It seems ticket:1008 relates.

#7 @westi
15 years ago

As commented on http://trac.wordpress.org/ticket/1008#comment:9 this works fine and is not a bug.

Note: See TracTickets for help on using tickets.