Fix for referrer check.

git-svn-id: http://svn.automattic.com/wordpress/trunk@1316 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
saxmatt 2004-05-19 06:44:55 +00:00
parent e81979c820
commit d4c2db17cb
1 changed files with 3 additions and 3 deletions

View File

@ -368,9 +368,9 @@ function touch_time($edit = 1) {
} }
function check_admin_referer() { function check_admin_referer() {
$adminurl = url_shorten(strtolower(get_settings('siteurl'))).'/wp-admin'; $adminurl = strtolower(get_settings('siteurl')).'/wp-admin';
$referer = url_shorten(strtolower($_SERVER['HTTP_REFERER'])); $referer = strtolower($_SERVER['HTTP_REFERER']);
if (substr($referer, 0, strlen($adminurl)) != $adminurl) { if ( !strstr($referer, $adminurl) ) {
die('Sorry, you need to enable sending referrers, for this feature to work.'); die('Sorry, you need to enable sending referrers, for this feature to work.');
} }
} }