Skip to content

Commit cfe3528

Browse files
author
pento
committed
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
1 parent 9b66c87 commit cfe3528

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

wp-admin/admin-post.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131

3232
$action = empty( $_REQUEST['action'] ) ? '' : $_REQUEST['action'];
3333

34-
if ( ! wp_validate_auth_cookie() ) {
34+
if ( ! is_user_logged_in() ) {
3535
if ( empty( $action ) ) {
3636
/**
3737
* Fires on a non-authenticated admin post request where no action is supplied.

wp-includes/version.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
*
1414
* @global string $wp_version
1515
*/
16-
$wp_version = '5.1-beta1-44614';
16+
$wp_version = '5.1-beta1-44615';
1717

1818
/**
1919
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.

0 commit comments

Comments
 (0)