Skip to content

Commit b183fd1

Browse files
committed
Administration: Ensure that admin referer nonce is valid.
Coding standards, ensure that nonce is valid with identical, rather then equal operator. Props vortfu, xknown, whyisjake. Built from https://develop.svn.wordpress.org/trunk@46477 git-svn-id: http://core.svn.wordpress.org/trunk@46275 1a063a9b-81f0-0310-95a4-ce76da25c4cd
1 parent 2524ba3 commit b183fd1

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Diff for: wp-includes/pluggable.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -1106,7 +1106,7 @@ function auth_redirect() {
11061106
* 0-12 hours ago, 2 if the nonce is valid and generated between 12-24 hours ago.
11071107
*/
11081108
function check_admin_referer( $action = -1, $query_arg = '_wpnonce' ) {
1109-
if ( -1 == $action ) {
1109+
if ( -1 === $action ) {
11101110
_doing_it_wrong( __FUNCTION__, __( 'You should specify a nonce action to be verified by using the first parameter.' ), '3.2.0' );
11111111
}
11121112

@@ -1125,7 +1125,7 @@ function check_admin_referer( $action = -1, $query_arg = '_wpnonce' ) {
11251125
*/
11261126
do_action( 'check_admin_referer', $action, $result );
11271127

1128-
if ( ! $result && ! ( -1 == $action && strpos( $referer, $adminurl ) === 0 ) ) {
1128+
if ( ! $result && ! ( -1 === $action && strpos( $referer, $adminurl ) === 0 ) ) {
11291129
wp_nonce_ays( $action );
11301130
die();
11311131
}

Diff for: wp-includes/version.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
*
1414
* @global string $wp_version
1515
*/
16-
$wp_version = '5.3-beta3-46476';
16+
$wp_version = '5.3-beta3-46477';
1717

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

0 commit comments

Comments
 (0)