From e002b0fc0753592ee1e7484182a95a8a38abc746 Mon Sep 17 00:00:00 2001 From: Dominik Schilling Date: Wed, 26 Nov 2014 19:19:23 +0000 Subject: [PATCH] Type cast `$nonce` to string in `wp_verify_nonce()`. props jesin. fixes #29542. Built from https://develop.svn.wordpress.org/trunk@30576 git-svn-id: http://core.svn.wordpress.org/trunk@30566 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/pluggable.php | 3 ++- wp-includes/version.php | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/wp-includes/pluggable.php b/wp-includes/pluggable.php index eb8207bd99..f55631faff 100644 --- a/wp-includes/pluggable.php +++ b/wp-includes/pluggable.php @@ -1695,7 +1695,8 @@ if ( !function_exists('wp_verify_nonce') ) : * @param string|int $action Should give context to what is taking place and be the same when nonce was created. * @return bool Whether the nonce check passed or failed. */ -function wp_verify_nonce($nonce, $action = -1) { +function wp_verify_nonce( $nonce, $action = -1 ) { + $nonce = (string) $nonce; $user = wp_get_current_user(); $uid = (int) $user->ID; if ( ! $uid ) { diff --git a/wp-includes/version.php b/wp-includes/version.php index c629c27784..1e1ad885b3 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.1-beta2-30575'; +$wp_version = '4.1-beta2-30576'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.