$config['referer_match'] = false to disable

This commit is contained in:
Michael Foster 2013-09-23 15:52:59 +10:00
parent de70fb6253
commit 00f4da3b82

View File

@ -181,7 +181,8 @@ if (isset($_POST['delete'])) {
error($config['error']['bot']);
// Check the referrer
if (!isset($_SERVER['HTTP_REFERER']) || !preg_match($config['referer_match'], urldecode($_SERVER['HTTP_REFERER'])))
if ($config['referer_match'] !== false &&
(!isset($_SERVER['HTTP_REFERER']) || !preg_match($config['referer_match'], urldecode($_SERVER['HTTP_REFERER']))))
error($config['error']['referer']);
checkDNSBL();