From f030e87cdc1c70b31db102aaa062ae66425df0b5 Mon Sep 17 00:00:00 2001 From: markjaquith 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: http://svn.automattic.com/wordpress/trunk@18195 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/pluggable.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/wp-includes/pluggable.php b/wp-includes/pluggable.php index ebcdb6fb1..3001433b8 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;