From 8608cdcee8a191bcb156a27facf2f0ad2080d73b Mon Sep 17 00:00:00 2001 From: desrosj Date: Tue, 11 Oct 2022 01:46:14 +0000 Subject: [PATCH] XML-RPC: Avoid loopback request in `blogger.getUsersBlogs`. The `blogger.getUsersBlogs` endpoint does not currently work on Multisite environments which require HTTPS. This changes `wp_xmlrpc_server::_multisite_getUsersBlogs()` to call the method directly instead of relying on a new `IXR_Client` request, which only supports HTTP. Props dd32. Fixes #56492. Built from https://develop.svn.wordpress.org/trunk@54468 git-svn-id: http://core.svn.wordpress.org/trunk@54027 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/class-wp-xmlrpc-server.php | 9 +++------ wp-includes/version.php | 2 +- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/wp-includes/class-wp-xmlrpc-server.php b/wp-includes/class-wp-xmlrpc-server.php index 10fe6605cc..9723488083 100644 --- a/wp-includes/class-wp-xmlrpc-server.php +++ b/wp-includes/class-wp-xmlrpc-server.php @@ -4859,12 +4859,9 @@ class wp_xmlrpc_server extends IXR_Server { $domain = $current_blog->domain; $path = $current_blog->path . 'xmlrpc.php'; - $rpc = new IXR_Client( set_url_scheme( "http://{$domain}{$path}" ) ); - $rpc->query( 'wp.getUsersBlogs', $args[1], $args[2] ); - $blogs = $rpc->getResponse(); - - if ( isset( $blogs['faultCode'] ) ) { - return new IXR_Error( $blogs['faultCode'], $blogs['faultString'] ); + $blogs = $this->wp_getUsersBlogs( $args ); + if ( $blogs instanceof IXR_Error ) { + return $blogs; } if ( $_SERVER['HTTP_HOST'] == $domain && $_SERVER['REQUEST_URI'] == $path ) { diff --git a/wp-includes/version.php b/wp-includes/version.php index 978b048dcd..c4699cdf4a 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.1-beta3-54467'; +$wp_version = '6.1-beta3-54468'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.