mirror of
https://github.com/itflow-org/itflow
synced 2026-07-25 01:40:40 +00:00
Replace Function sanitizeInput() with just escapeSql() and update all instances throughout
This commit is contained in:
@@ -10,7 +10,7 @@ if (isset($_POST['add_tax'])) {
|
||||
|
||||
validateCSRFToken($_POST['csrf_token']);
|
||||
|
||||
$name = sanitizeInput($_POST['name']);
|
||||
$name = escapeSql($_POST['name']);
|
||||
$percent = floatval($_POST['percent']);
|
||||
|
||||
mysqli_query($mysqli,"INSERT INTO taxes SET tax_name = '$name', tax_percent = $percent");
|
||||
@@ -30,7 +30,7 @@ if (isset($_POST['edit_tax'])) {
|
||||
validateCSRFToken($_POST['csrf_token']);
|
||||
|
||||
$tax_id = intval($_POST['tax_id']);
|
||||
$name = sanitizeInput($_POST['name']);
|
||||
$name = escapeSql($_POST['name']);
|
||||
$percent = floatval($_POST['percent']);
|
||||
|
||||
mysqli_query($mysqli,"UPDATE taxes SET tax_name = '$name', tax_percent = $percent WHERE tax_id = $tax_id");
|
||||
@@ -49,7 +49,7 @@ if (isset($_GET['archive_tax'])) {
|
||||
|
||||
$tax_id = intval($_GET['archive_tax']);
|
||||
|
||||
$tax_name = sanitizeInput(getFieldById('taxes', $tax_id, 'tax_name'));
|
||||
$tax_name = escapeSql(getFieldById('taxes', $tax_id, 'tax_name'));
|
||||
|
||||
mysqli_query($mysqli,"UPDATE taxes SET tax_archived_at = NOW() WHERE tax_id = $tax_id");
|
||||
|
||||
@@ -67,7 +67,7 @@ if (isset($_GET['delete_tax'])) {
|
||||
|
||||
$tax_id = intval($_GET['delete_tax']);
|
||||
|
||||
$tax_name = sanitizeInput(getFieldById('taxes', $tax_id, 'tax_name'));
|
||||
$tax_name = escapeSql(getFieldById('taxes', $tax_id, 'tax_name'));
|
||||
|
||||
mysqli_query($mysqli,"DELETE FROM taxes WHERE tax_id = $tax_id");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user