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

git-svn-id: http://svn.automattic.com/wordpress/trunk@3908 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan
2006-06-24 05:38:37 +00:00
parent e232ef9a32
commit 9876a3606f
3 changed files with 31 additions and 3 deletions

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 )