Fix for referrer check.
git-svn-id: https://develop.svn.wordpress.org/trunk@1316 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
1fa7e5b934
commit
ffdc641fc8
@ -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
Block a user