summaryrefslogtreecommitdiff
path: root/index.php
diff options
context:
space:
mode:
Diffstat (limited to 'index.php')
-rw-r--r--index.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/index.php b/index.php
index 1790d8ab0..041fd7ef5 100644
--- a/index.php
+++ b/index.php
@@ -2,6 +2,12 @@
include "includes/theme.inc";
+### Security check:
+if (strstr($number, " ") || strstr($date, " ")) {
+ watchdog("error", "main page: attempt to provide malicious input through URI");
+ exit();
+}
+
### Initialize/pre-process variables:
$number = ($user->stories) ? $user->stories : 10;
$date = ($date) ? $date : time();