feat: refuse database testing after installation
This commit is contained in:
parent
66090d0a19
commit
7f5e48014d
2 changed files with 9 additions and 1 deletions
|
@ -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)!
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue