wp_get_referer() and friends from robmiller and markjaquith. fixes #2800

git-svn-id: https://develop.svn.wordpress.org/trunk@3908 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren
2006-06-24 05:38:37 +00:00
parent deac9fea9d
commit dbbb1802b6
3 changed files with 31 additions and 3 deletions
+1 -1
View File
@@ -231,7 +231,7 @@ if ( !function_exists('check_admin_referer') ) :
function check_admin_referer($action = -1) {
global $pagenow, $menu, $submenu, $parent_file, $submenu_file;;
$adminurl = strtolower(get_settings('siteurl')).'/wp-admin';
$referer = strtolower($_SERVER['HTTP_REFERER']);
$referer = strtolower(wp_get_referer());
if ( !wp_verify_nonce($_REQUEST['_wpnonce'], $action) &&
!(-1 == $action && strstr($referer, $adminurl)) ) {
if ( $referer )