summaryrefslogtreecommitdiff
path: root/post.php
diff options
context:
space:
mode:
authorSavetheinternet <savetheinternet@tinyboard.org>2011-10-03 18:38:19 +1100
committerSavetheinternet <savetheinternet@tinyboard.org>2011-10-03 18:38:19 +1100
commit67b954924bc9cdd30741542f7867c80aa2b48b1e (patch)
treea2597feddb1c4b5e3b261dcbf9a2410edba9ae3b /post.php
parent55743a77054f1a5a5157856bd2c11751892653d2 (diff)
Referer checking; more descriptive error message
Diffstat (limited to 'post.php')
-rw-r--r--post.php5
1 files changed, 2 insertions, 3 deletions
diff --git a/post.php b/post.php
index 57d11a0e..1b39cb3e 100644
--- a/post.php
+++ b/post.php
@@ -151,9 +151,8 @@
error($config['error']['bot']);
// Check the referrer
- if($OP) {
- if(!isset($_SERVER['HTTP_REFERER']) || !preg_match($config['url_match'], $_SERVER['HTTP_REFERER'])) error($config['error']['bot']);
- }
+ if(!isset($_SERVER['HTTP_REFERER']) || !preg_match($config['referer_match'], $_SERVER['HTTP_REFERER']))
+ error($config['error']['referer']);
// TODO: Since we're now using static HTML files, we can't give them cookies on their first page view
// Find another anti-spam method.