Fix for referrer check.
git-svn-id: http://svn.automattic.com/wordpress/trunk@1316 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
e81979c820
commit
d4c2db17cb
|
@ -368,9 +368,9 @@ function touch_time($edit = 1) {
|
|||
}
|
||||
|
||||
function check_admin_referer() {
|
||||
$adminurl = url_shorten(strtolower(get_settings('siteurl'))).'/wp-admin';
|
||||
$referer = url_shorten(strtolower($_SERVER['HTTP_REFERER']));
|
||||
if (substr($referer, 0, strlen($adminurl)) != $adminurl) {
|
||||
$adminurl = strtolower(get_settings('siteurl')).'/wp-admin';
|
||||
$referer = strtolower($_SERVER['HTTP_REFERER']);
|
||||
if ( !strstr($referer, $adminurl) ) {
|
||||
die('Sorry, you need to enable sending referrers, for this feature to work.');
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue