Make WordPress Core

Ticket #29750: ticket29750.diff

File ticket29750.diff, 834 bytes (added by kitchin, 8 years ago)

Untested patch.

  • wp-includes/class-wp-xmlrpc-server.php

     
    596596         *  - 'xmlrpc' - url of xmlrpc endpoint
    597597         */
    598598        public function wp_getUsersBlogs( $args ) {
     599
     600                // Bail on XML with a missing param that causes IXR to treat params as a string instead of an array.
     601                // Example: ...<params><param><value>someuser</value></param><param><value></value></param></params>...
     602                if ( ! is_array( $args ) ) {
     603                        $this->error = new IXR_Error( 403, __( 'Incorrect username or password.' ) );
     604                        return $this->error;
     605                }
     606
    599607                // If this isn't on WPMU then just use blogger_getUsersBlogs
    600608                if ( !is_multisite() ) {
    601609                        array_unshift( $args, 1 );