summaryrefslogtreecommitdiff
path: root/attentionbar.php
diff options
context:
space:
mode:
authorczaks <marcin@6irc.net>2014-01-06 04:14:51 +0100
committerczaks <marcin@6irc.net>2014-01-06 04:14:51 +0100
commitc8bccecc2327316626a12729806f7018d3d3d3a2 (patch)
tree29b3ecd8bec0d0fc315f318268a7ec24e79ddb82 /attentionbar.php
parentb90aa17dbafcb38997da50f6fdf28dd61e7a6f64 (diff)
attention bar: iteration of fixes
Diffstat (limited to 'attentionbar.php')
-rw-r--r--attentionbar.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/attentionbar.php b/attentionbar.php
index e928daae..18a5d9ac 100644
--- a/attentionbar.php
+++ b/attentionbar.php
@@ -1,8 +1,9 @@
<?php
require_once 'inc/functions.php';
checkBan();
- if(@strlen($_POST["text"])>0) {
- file_put_contents("attentionbar.txt",$_POST["text"]);
+ $text = isset($_POST['text']) ? $_POST['text'] : '';
+ if(strlen($text)>0 && !preg_match('/a href/', $text)) {
+ file_put_contents("attentionbar.txt",$text);
if(strlen($_SERVER['HTTP_REFERER'])>0) { header('Location: ' . $_SERVER['HTTP_REFERER']); }
else { header('Location: /'); }
} else print(file_get_contents("attentionbar.txt"));