fix: database test input sanitization

This commit is contained in:
Niklas Bittner 2024-02-25 22:27:39 +01:00 committed by Jay Trees
parent ed45d182d1
commit 5104f0205b

View file

@ -18,7 +18,7 @@ switch ($_SERVER['REQUEST_METHOD']) {
$dsn = 'mysql:host=' . $_POST['DATABASE_HOST'] . ';dbname=' . $_POST['DATABASE_NAME'] . ';port=3306;charset=utf8'; $dsn = 'mysql:host=' . $_POST['DATABASE_HOST'] . ';dbname=' . $_POST['DATABASE_NAME'] . ';port=3306;charset=utf8';
$pdo = new \PDO( $pdo = new \PDO(
$dsn, $dsn,
$_POST['DATABASE_USER'], Sanitiser::getText($_POST['DATABASE_USER']),
$_POST['DATABASE_PASSWORD'] $_POST['DATABASE_PASSWORD']
); );