From 46a87bd9fac7aa06c32a487af0bbef4201cd0de3 Mon Sep 17 00:00:00 2001 From: Mark Jaquith Date: Wed, 8 Jun 2011 16:56:26 +0000 Subject: [PATCH] Throw _doing_it_wrong() when nonce action not passed to check_admin_referer(). props duck_. see #16449 git-svn-id: https://develop.svn.wordpress.org/trunk@18195 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/pluggable.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/wp-includes/pluggable.php b/wp-includes/pluggable.php index ebcdb6fb13..3001433b82 100644 --- a/wp-includes/pluggable.php +++ b/wp-includes/pluggable.php @@ -866,6 +866,9 @@ if ( !function_exists('check_admin_referer') ) : * @param string $query_arg where to look for nonce in $_REQUEST (since 2.5) */ function check_admin_referer($action = -1, $query_arg = '_wpnonce') { + if ( -1 == $action ) + _doing_it_wrong( __FUNCTION__, __( 'You should specify a nonce action to be verified by using the first parameter.' ), '3.2' ); + $adminurl = strtolower(admin_url()); $referer = strtolower(wp_get_referer()); $result = isset($_REQUEST[$query_arg]) ? wp_verify_nonce($_REQUEST[$query_arg], $action) : false;