aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/index.php
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2020-06-30 09:15:19 +0200
committerGitHub <noreply@github.com>2020-06-30 09:15:19 +0200
commita4d15dc00b77f93142c8b7373b635d074dcd7dda (patch)
treef8f4d38b8528f19285377b9625a220b40051f8e3 /index.php
parent7f153c56d1815159b9bb4a79f1c8a9b66afb1461 (diff)
downloaddokuwiki-a4d15dc00b77f93142c8b7373b635d074dcd7dda.tar.gz
dokuwiki-a4d15dc00b77f93142c8b7373b635d074dcd7dda.zip
router: send proper HTTP header when access denied
Co-authored-by: Henry Pan <git@phy25.com>
Diffstat (limited to 'index.php')
-rw-r--r--index.php1
1 files changed, 1 insertions, 0 deletions
diff --git a/index.php b/index.php
index d62a3877f..4a9ed0834 100644
--- a/index.php
+++ b/index.php
@@ -52,6 +52,7 @@ if (preg_match('/^\/_media\/(.*)/', $_SERVER['SCRIPT_NAME'], $m)) {
if (preg_match('/\/([._]ht|README$|VERSION$|COPYING$)/', $_SERVER['SCRIPT_NAME']) or
preg_match('/^\/(data|conf|bin|inc)\//', $_SERVER['SCRIPT_NAME'])
) {
+ header('HTTP/1.1 403 Forbidden');
die('Access denied');
}