#56492 closed defect (bug) (fixed)
blogger.getUsersBlogs doesn't work on Multisite when HTTPS is enforced
Reported by: | dd32 | Owned by: | desrosj |
---|---|---|---|
Milestone: | 6.1 | Priority: | normal |
Severity: | normal | Version: | |
Component: | XML-RPC | Keywords: | has-patch |
Focuses: | multisite | Cc: |
Description
The XML-RPC endpoint blogger.getUsersBlogs
doesn't work on Multisite environments which require HTTPS.
This is because the endpoint defers to wp_xmlrpc_server::_multisite_getUsersBlogs()
on multisite which then performs a new IXR request against the current site, and IXR_Client
only supports HTTP.
The attached PR simply changes the code to instead call the XMLRPC method directly, rather than through an additional HTTP request, avoiding the network loopback request and removing the failure points.
Change History (7)
This ticket was mentioned in PR #3167 on WordPress/wordpress-develop by dd32.
2 years ago
#1
- Keywords has-patch added
9 months ago
#7
This is a closed PR. Could you please open a ticket on Trac with more details?
I want to , but i cant open wordpress trac website.
This issue is simple:
File class-wp-xmlrpc-server.php, line 4881:
Just change
$blogs = $this->wp_getUsersBlogs( $args );
To
$blogs = $this->wp_getUsersBlogs( [$args[1], $args[2] ); // my last comment is incorrect, it should be [$args[1], $args[2] , not [$args[0], $args[1]
Then xml-rpc on multisite will work.
Here is the reason:
_multisite_getUsersBlogs's args are
@type int $0 Blog ID (unused). @type string $1 Username. @type string $2 Password.
But wp_getUsersBlogs's args are
@type string $0 Username. @type string $1 Password.
Trac ticket: https://core.trac.wordpress.org/ticket/56492