feat: refuse database testing after installation

This commit is contained in:
Jay Trees 2025-03-10 12:08:49 +01:00
parent 66090d0a19
commit 7f5e48014d
2 changed files with 9 additions and 1 deletions

View file

@ -22,4 +22,4 @@
### Security
- Nothing
- Added a check to disable database testing (`/index.php?page=api&module=database-test`) after wishthis has been installed - Thanks [@kumitterer](https://github.com/kumitterer)!

View file

@ -10,6 +10,14 @@ namespace wishthis;
global $page, $database;
if (isset($database) && $database) {
echo __('Refused to test database connection after installation.');
$response['dbTestSuccess'] = false;
return;
}
switch ($_SERVER['REQUEST_METHOD']) {
case 'POST':
$success = false;