Replace Function sanitizeInput() with just escapeSql() and update all instances throughout

This commit is contained in:
johnnyq
2026-07-14 17:17:50 -04:00
parent 7bc47a58fe
commit b57ddc0e5c
148 changed files with 1945 additions and 1945 deletions

View File

@@ -1,17 +1,17 @@
<?php
defined('FROM_POST_HANDLER') || die("Direct file access is not allowed");
$name = sanitizeInput($_POST['name']);
$primary_interface = sanitizeInput($_POST['primary_interface']) ?? 0;
$description = sanitizeInput($_POST['description']);
$type = sanitizeInput($_POST['type']);
$mac = sanitizeInput($_POST['mac']);
$ip = sanitizeInput($_POST['ip']);
$name = escapeSql($_POST['name']);
$primary_interface = escapeSql($_POST['primary_interface']) ?? 0;
$description = escapeSql($_POST['description']);
$type = escapeSql($_POST['type']);
$mac = escapeSql($_POST['mac']);
$ip = escapeSql($_POST['ip']);
if ($_POST['dhcp'] == 1){
$ip = 'DHCP';
}
$nat_ip = sanitizeInput($_POST['nat_ip']);
$ipv6 = sanitizeInput($_POST['ipv6']);
$nat_ip = escapeSql($_POST['nat_ip']);
$ipv6 = escapeSql($_POST['ipv6']);
$network = intval($_POST['network']);
$notes = sanitizeInput($_POST['notes']);
$notes = escapeSql($_POST['notes']);
$connected_to = intval($_POST['connected_to']);