From 98296b888e9d576d7b1668bfb0d5410f3f977d69 Mon Sep 17 00:00:00 2001 From: Roman Hergenreder Date: Thu, 18 Jun 2020 15:39:10 +0200 Subject: [PATCH] htaccess + permissions --- .idea/.htaccess | 1 + index.php | 3 ++- src/src/.htaccess | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 .idea/.htaccess create mode 100644 src/src/.htaccess diff --git a/.idea/.htaccess b/.idea/.htaccess new file mode 100644 index 0000000..3bc3c22 --- /dev/null +++ b/.idea/.htaccess @@ -0,0 +1 @@ +DENY FROM ALL; \ No newline at end of file diff --git a/index.php b/index.php index b300ff6..862568a 100644 --- a/index.php +++ b/index.php @@ -10,7 +10,8 @@ include_once 'core/datetime.php'; include_once 'core/constants.php'; if (!is_readable(getClassPath(Configuration::class))) { - die("Configuration directory is not readable, please check permissions before proceeding"); + header("Content-Type", "application/json"); + die(json_encode(array( "success" => false, "msg" => "Configuration directory is not readable, check permissions before proceeding." ))); } spl_autoload_extensions(".php"); diff --git a/src/src/.htaccess b/src/src/.htaccess new file mode 100644 index 0000000..3bc3c22 --- /dev/null +++ b/src/src/.htaccess @@ -0,0 +1 @@ +DENY FROM ALL; \ No newline at end of file