From 004009ca51129b91d3e53a3a200e4e1d3f514dc9 Mon Sep 17 00:00:00 2001 From: Bye <bye@byecorps.com> Date: Fri, 29 Mar 2024 22:02:39 +0000 Subject: [PATCH] Fix essential security bug --- index.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/index.php b/index.php index 354cb19..4751dc3 100755 --- a/index.php +++ b/index.php @@ -190,10 +190,10 @@ if ($migrated) { echo "<h2 class=\"subheading\">Admin</h2>"; } -// if ($uri[0] == "admin" && !$user['is_admin']) { -// http_response_code(401); -// die("<img src='https://http.cat/401.jpg' alt='A cat standing in front of a door with a No Cats Allowed sign on it.' />"); -// } + if ($uri[0] == "admin" && !$user['is_admin']) { + http_response_code(401); + die("<img src='https://http.cat/401.jpg' alt='A cat standing in front of a door with a No Cats Allowed sign on it.' />"); + } if ($uri[0] == "docs") { $include = "docs.php"; -- GitLab