Fix SQL injection in admin_reports.php

This commit is contained in:
Mark Samman 2014-10-29 19:32:48 +01:00
parent 0a82152b97
commit 3c70b55ae3

View File

@ -41,9 +41,9 @@ if (!empty($_POST)) {
$customPoints = getValue($_POST['customPoints']);
$reportId = getValue($_POST['id']);
$changelogReportId = &$_POST['changelogReportId'];
$changelogReportId = (int)$_POST['changelogReportId'];
$changelogValue = &$_POST['changelogValue'];
$changelogText = &$_POST['changelogText'];
$changelogText = getValue($_POST['changelogText']);
$changelogStatus = ($changelogReportId !== false && $changelogValue === '2' && $changelogText !== false) ? true : false;
if ($customPoints !== false) $price = (int)($price + $customPoints);