From 62b2f7dd50e100157cf95dc3e9bc968d1cb18436 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Thu, 21 Jan 2021 12:32:54 +0000 Subject: [PATCH] Site Health: Use a front-end URL for loopback tests. In [49154] the async Site Health tests were changed to use the REST API instead of admin-ajax. An unintended side effect of this change was that the loopback tests which tried to ping the site's `admin_url()` were no longer authenticated because admin-cookies aren't provided to the REST API. This commit adjusts the loopback test to use the front-end `site_url` which checks that cron will function properly. A follow-up ticket will focus on tests that will cover the file editor checks. Props Clorith. Merges [49917] to the 5.6 branch. Fixes #52097. See #48105. Built from https://develop.svn.wordpress.org/branches/5.6@49997 git-svn-id: http://core.svn.wordpress.org/branches/5.6@49698 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/class-wp-site-health.php | 2 +- wp-includes/version.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-admin/includes/class-wp-site-health.php b/wp-admin/includes/class-wp-site-health.php index fcc1ed7247..fe38c4ef6c 100644 --- a/wp-admin/includes/class-wp-site-health.php +++ b/wp-admin/includes/class-wp-site-health.php @@ -2531,7 +2531,7 @@ class WP_Site_Health { $headers['Authorization'] = 'Basic ' . base64_encode( wp_unslash( $_SERVER['PHP_AUTH_USER'] ) . ':' . wp_unslash( $_SERVER['PHP_AUTH_PW'] ) ); } - $url = admin_url(); + $url = site_url(); $r = wp_remote_get( $url, compact( 'cookies', 'headers', 'timeout', 'sslverify' ) ); diff --git a/wp-includes/version.php b/wp-includes/version.php index 064ee2b186..54076460fb 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.6.1-alpha-49996'; +$wp_version = '5.6.1-alpha-49997'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.