diff --git a/wp-includes/load.php b/wp-includes/load.php index b0b8209235..8c549d3660 100644 --- a/wp-includes/load.php +++ b/wp-includes/load.php @@ -1806,8 +1806,20 @@ function wp_start_scraping_edited_file_errors() { $key = substr( sanitize_key( wp_unslash( $_REQUEST['wp_scrape_key'] ) ), 0, 32 ); $nonce = wp_unslash( $_REQUEST['wp_scrape_nonce'] ); + if ( empty( $key ) || empty( $nonce ) ) { + return; + } - if ( get_transient( 'scrape_key_' . $key ) !== $nonce ) { + $transient = get_transient( 'scrape_key_' . $key ); + if ( false === $transient ) { + return; + } + + if ( $transient !== $nonce ) { + if ( ! headers_sent() ) { + header( 'X-Robots-Tag: noindex' ); + nocache_headers(); + } echo "###### wp_scraping_result_start:$key ######"; echo wp_json_encode( array( diff --git a/wp-includes/version.php b/wp-includes/version.php index e8165bdcac..e0e366b5f4 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.7-beta1-59170'; +$wp_version = '6.7-beta1-59171'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.