mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2025-10-16 12:05:38 +00:00
Improvement to check_admin_referer() when called without first argument (PLUGIN AUTHORS: STOP DOING THAT). props indie-ulf. fixes #16449 for trunk
git-svn-id: https://develop.svn.wordpress.org/trunk@17385 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
b625dbb1bb
commit
04ab78140f
@ -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
Block a user