Make WordPress Core

Ticket #3395: patch.txt

File patch.txt, 756 bytes (added by donncha, 18 years ago)
Line 
1Index: xmlrpc.php
2===================================================================
3--- xmlrpc.php  (revision 4534)
4+++ xmlrpc.php  (working copy)
5@@ -817,7 +817,7 @@
6                $user_pass   = $wpdb->escape($args[2]);
7                $data        = $args[3];
8 
9-               $name = $data['name'];
10+               $name = sanitize_file( $data['name'] );
11                $type = $data['type'];
12                $bits = $data['bits'];
13 
14@@ -841,7 +841,7 @@
15                        logIO('O', '(MW) Could not write file '.$name);
16                        return new IXR_Error(500, 'Could not write file '.$name);
17                }
18-               return apply_filters( 'wp_handle_upload', array( 'file' => $name, 'url' => $upload[ 'url' ], 'type' => $type ) );
19+               return apply_filters( 'wp_handle_upload', array( 'file' => $upload[ 'file' ], 'url' => $upload[ 'url' ], 'type' => $type ) );
20        }
21 
22