1
0
Fork 0
mirror of https://github.com/sbrl/Pepperminty-Wiki.git synced 2024-06-26 17:24:56 +00:00

Security: Fix logic in page-debug

This commit is contained in:
Starbeamrainbowlabs 2020-07-09 00:15:54 +01:00
parent ff46c132cd
commit 3a12e83e96
Signed by: sbrl
GPG key ID: 1BE5172E637709C2

View file

@ -1,7 +1,7 @@
<?php <?php
register_module([ register_module([
"name" => "Debug Information", "name" => "Debug Information",
"version" => "0.2", "version" => "0.3",
"author" => "Starbeamrainbowlabs", "author" => "Starbeamrainbowlabs",
"description" => "Adds a debug action for administrator use only that collects a load of useful information to make reporting bugs easier.", "description" => "Adds a debug action for administrator use only that collects a load of useful information to make reporting bugs easier.",
"id" => "page-debug-info", "id" => "page-debug-info",
@ -29,7 +29,7 @@ register_module([
global $settings, $env, $paths, $version, $commit; global $settings, $env, $paths, $version, $commit;
header("content-type: text/plain"); header("content-type: text/plain");
if(!$env->is_admin && (isset($_GET["secret"]) && $_GET["secret"] !== $settings->secret)) { if(!$env->is_admin && (!isset($_GET["secret"]) && $_GET["secret"] !== $settings->secret)) {
exit("You must be logged in as an moderator in order to generate debugging information."); exit("You must be logged in as an moderator in order to generate debugging information.");
} }