WordPress.org

Make WordPress Core

Changeset 38600


Ignore:
Timestamp:
09/13/16 23:16:15 (11 months ago)
Author:
SergeyBiryukov
Message:

XML-RPC: Check the minimum number of arguments in ::wp_getUsersBlogs() and ::blogger_getUsersBlogs().

Props kitchin for initial patch.
Fixes #29750.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-xmlrpc-server.php

    r38510 r38600  
    597597     */ 
    598598    public function wp_getUsersBlogs( $args ) { 
     599        if ( ! $this->minimum_args( $args, 2 ) ) { 
     600            return $this->error; 
     601        } 
     602 
    599603        // If this isn't on WPMU then just use blogger_getUsersBlogs 
    600604        if ( !is_multisite() ) { 
     
    43234327     */ 
    43244328    public function blogger_getUsersBlogs($args) { 
    4325         if ( is_multisite() ) 
     4329        if ( ! $this->minimum_args( $args, 3 ) ) { 
     4330            return $this->error; 
     4331        } 
     4332 
     4333        if ( is_multisite() ) { 
    43264334            return $this->_multisite_getUsersBlogs($args); 
     4335        } 
    43274336 
    43284337        $this->escape($args); 
Note: See TracChangeset for help on using the changeset viewer.