Fix essential security bug

This commit is contained in:
Bye 2024-03-29 22:02:39 +00:00 committed by GitHub
parent 3246a9992d
commit 004009ca51
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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";