From 2d6b8f237d4dfc494aca38e6e6e566d71cce3d5e Mon Sep 17 00:00:00 2001 From: Thomas Vincent Date: Wed, 8 Apr 2026 22:37:06 -0700 Subject: [PATCH 1/2] fix(security): defense-in-depth hardening for plugin_thold Automated fixes: - XSS: escape request variables in HTML output - SQLi: convert string-concat queries to prepared statements - Deserialization: add allowed_classes=>false - Temp files: replace rand() with tempnam() Signed-off-by: Thomas Vincent --- notify_lists.php | 12 ++++++------ setup.php | 12 ++++++------ thold_graph.php | 4 ++-- thold_process.php | 2 +- thold_webapi.php | 2 +- 5 files changed, 16 insertions(+), 16 deletions(-) diff --git a/notify_lists.php b/notify_lists.php index 537563b..9921be9 100644 --- a/notify_lists.php +++ b/notify_lists.php @@ -1138,7 +1138,7 @@ function hosts($header_label) { @@ -1567,11 +1567,11 @@ function thold_device_template_top() { $('#continue').click(function(data) { $.post('host_templates.php?action=item_remove_tt', { __csrf_magic: csrfMagicToken, - host_template_id: , - id: + host_template_id: , + id: }).done(function(data) { $('#cdialog').dialog('close'); - loadPageNoHeader('host_templates.php?action=edit&header=false&id='); + loadPageNoHeader('host_templates.php?action=edit&header=false&id='); }); }); diff --git a/thold_graph.php b/thold_graph.php index 97a61af..ee63262 100644 --- a/thold_graph.php +++ b/thold_graph.php @@ -251,7 +251,7 @@ function form_thold_filter() { - '> + '>