diff --git a/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php b/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php index 11bc499fc6..8aec375bc8 100644 --- a/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php +++ b/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php @@ -504,9 +504,9 @@ class WP_REST_Posts_Controller extends WP_REST_Controller { ); } - if ( $post && ! empty( $request['password'] ) ) { + if ( $post && ! empty( $request->get_query_params()['password'] ) ) { // Check post password, and return error if invalid. - if ( ! hash_equals( $post->post_password, $request['password'] ) ) { + if ( ! hash_equals( $post->post_password, $request->get_query_params()['password'] ) ) { return new WP_Error( 'rest_post_incorrect_password', __( 'Incorrect post password.' ), diff --git a/wp-includes/version.php b/wp-includes/version.php index 83add0524b..22ef0ce46a 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.7-alpha-59035'; +$wp_version = '6.7-alpha-59036'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.