Ticket #16986: getoptions2.diff

File getoptions2.diff, 617 bytes (added by ericmann, 2 years ago)

Updated patch file to reference the file it's patching.

Line 
1Index: wp-includes/class-wp-xmlrpc-server.php
2===================================================================
3--- wp-includes/class-wp-xmlrpc-server.php      (revision 17566)
4+++ wp-includes/class-wp-xmlrpc-server.php      (working copy)
5@@ -1422,6 +1422,9 @@
6                if ( !$user = $this->login($username, $password) )
7                        return $this->error;
8 
9+               if ( !current_user_can( 'manage_options' ) )
10+                       return new IXR_Error( 403, __( 'You are not allowed to update options.' ) );
11+
12                // If no specific options where asked for, return all of them
13                if ( count( $options ) == 0 )
14                        $options = array_keys($this->blog_options);