summaryrefslogtreecommitdiff
path: root/system/config.php
diff options
context:
space:
mode:
Diffstat (limited to 'system/config.php')
-rw-r--r--system/config.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/system/config.php b/system/config.php
index 8e1879d..e03e95b 100644
--- a/system/config.php
+++ b/system/config.php
@@ -4,8 +4,8 @@ include_once "{$_SERVER['DOCUMENT_ROOT']}/lib/partials.php";
include_once "{$_SERVER['DOCUMENT_ROOT']}/lib/alert.php";
include_once "{$_SERVER['DOCUMENT_ROOT']}/lib/accounts.php";
-if (file_exists(CFG_PATH) && !authorize_user(true) && !isset($_SESSION['user_role']['permission_admin'])) {
- generate_alert('/', 'Unauthorized', 401);
+if (file_exists(CFG_PATH) && (!authorize_user(true) || !isset($_SESSION['user_role']) || !$_SESSION['user_role']['permission_admin'])) {
+ generate_alert('/404.php', 'Unauthorized', 401);
exit();
}