From 4fa5437fc1c7095f8f3073f74f66edf0179e4940 Mon Sep 17 00:00:00 2001 From: Gary Pendergast Date: Wed, 16 Jan 2019 05:41:50 +0000 Subject: [PATCH] Admin: Use `is_user_logged_in()` instead of `wp_validate_auth_cookie()` in `admin-post.php`. This matches the authentication check in `admin-ajax.php`, and allows the authentication method to be filtered. Props jmdodd. Fixes #45475. Built from https://develop.svn.wordpress.org/trunk@44615 git-svn-id: http://core.svn.wordpress.org/trunk@44446 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/admin-post.php | 2 +- wp-includes/version.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-admin/admin-post.php b/wp-admin/admin-post.php index b4aed5275b..48e76feec5 100644 --- a/wp-admin/admin-post.php +++ b/wp-admin/admin-post.php @@ -31,7 +31,7 @@ do_action( 'admin_init' ); $action = empty( $_REQUEST['action'] ) ? '' : $_REQUEST['action']; -if ( ! wp_validate_auth_cookie() ) { +if ( ! is_user_logged_in() ) { if ( empty( $action ) ) { /** * Fires on a non-authenticated admin post request where no action is supplied. diff --git a/wp-includes/version.php b/wp-includes/version.php index dd5806ba40..efde8b40fe 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.1-beta1-44614'; +$wp_version = '5.1-beta1-44615'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.