From 568ee86eb5d02fe293f90f1b9b66f50654929436 Mon Sep 17 00:00:00 2001 From: Tony Murray Date: Sun, 29 Sep 2024 16:34:12 -0500 Subject: [PATCH] Fix double escaping sysname in device dependencies (#16458) I double checked that we aren't missing any escapes elsewhere on sysname and it looks good. --- includes/html/forms/get-host-dependencies.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/html/forms/get-host-dependencies.inc.php b/includes/html/forms/get-host-dependencies.inc.php index 3d4281977c18..960574db3787 100644 --- a/includes/html/forms/get-host-dependencies.inc.php +++ b/includes/html/forms/get-host-dependencies.inc.php @@ -73,7 +73,7 @@ } $hostname = format_hostname($myrow); - $sysname = htmlspecialchars(($hostname == $myrow['sysName']) ? $myrow['hostname'] : $myrow['sysName']); + $sysname = $hostname == $myrow['sysName'] ? $myrow['hostname'] : $myrow['sysName']; array_push($res_arr, ['deviceid' => $myrow['id'], 'hostname' => $hostname, 'sysname' => $sysname, 'parent' => $parent, 'parentid' => $myrow['parentid']]); } $status = ['current' => $_POST['current'], 'rowCount' => $_POST['rowCount'], 'rows' => $res_arr, 'total' => $rec_count];