Improvement to check_admin_referer() when called without first argument (PLUGIN AUTHORS: STOP DOING THAT). props indie-ulf. fixes #16449 for 3.1
git-svn-id: http://svn.automattic.com/wordpress/branches/3.1@17386 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
8fdfe5aa1c
commit
f658bc1cc3
|
@ -835,7 +835,7 @@ function check_admin_referer($action = -1, $query_arg = '_wpnonce') {
|
|||
$adminurl = strtolower(admin_url());
|
||||
$referer = strtolower(wp_get_referer());
|
||||
$result = isset($_REQUEST[$query_arg]) ? wp_verify_nonce($_REQUEST[$query_arg], $action) : false;
|
||||
if ( !$result && !(-1 == $action && strpos($referer, $adminurl) !== false) ) {
|
||||
if ( !$result && !(-1 == $action && strpos($referer, $adminurl) === 0) ) {
|
||||
wp_nonce_ays($action);
|
||||
die();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue