summaryrefslogtreecommitdiff
path: root/inc/mod.php
diff options
context:
space:
mode:
authorSavetheinternet <savetheinternet@n0v4.com>2011-04-13 22:21:07 +1000
committerSavetheinternet <savetheinternet@n0v4.com>2011-04-13 22:21:07 +1000
commitb8951025635edc3c291d39bbab9f248e8c3de720 (patch)
tree1362e4efd96652d058ed1f4b4e56370aa43c64fc /inc/mod.php
parenta9bdc6eeb7f6dfa462d0400c51ffd37f562a8be2 (diff)
block loading include files directly
Diffstat (limited to 'inc/mod.php')
-rw-r--r--inc/mod.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/inc/mod.php b/inc/mod.php
index 274159ba..78351ba7 100644
--- a/inc/mod.php
+++ b/inc/mod.php
@@ -1,5 +1,10 @@
<?php
-
+ if($_SERVER['SCRIPT_FILENAME'] == str_replace('\\', '/', __FILE__)) {
+ // You cannot request this file directly.
+ header('Location: ../', true, 302);
+ exit;
+ }
+
// Creates a small random string for validating moderators' cookies
function mkhash($length=12) {
// The method here isn't really important,