Complete security audit fixes
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
<?php
|
||||
session_start();
|
||||
|
||||
require '../../../preset.php';
|
||||
require '../../../assets/utils/db_auth.php';
|
||||
|
||||
$sql = "SELECT *
|
||||
@@ -9,11 +8,10 @@
|
||||
WHERE
|
||||
company_id = {$company_id}";
|
||||
$sth = $pdo2->prepare($sql);
|
||||
$sth->execute();
|
||||
if ($sth->errorInfo()[0] != "00000" && !empty($sth->errorInfo()[0])) {
|
||||
$answer["message"] = (empty($sth->errorInfo()[2])) ? $sth->errorInfo()[0] : $sth->errorInfo()[2];
|
||||
exit(json_encode($answer));
|
||||
}
|
||||
$sth->execute([
|
||||
":company_id" => $company_id
|
||||
]);
|
||||
db_check($sth, $answer);
|
||||
|
||||
$answer["output"] = $sth->fetchAll(PDO::FETCH_ASSOC);
|
||||
$answer["success"] = 1;
|
||||
|
||||
Reference in New Issue
Block a user