added check_admin_referer()
git-svn-id: https://develop.svn.wordpress.org/trunk@1297 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
5ee0dc12cc
commit
771f496fe7
@ -367,4 +367,12 @@ function touch_time($edit = 1) {
|
||||
<?php
|
||||
}
|
||||
|
||||
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) {
|
||||
die('Sorry, you need to enable sending referrers, for this feature to work.');
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
Loading…
Reference in New Issue
Block a user