From 59867f48702d29624ee97fd893b15b3379a16a4d Mon Sep 17 00:00:00 2001 From: Thomas Vincent Date: Tue, 18 Aug 2026 20:53:25 -0700 Subject: [PATCH 1/2] security: escape output in threshold web views Escapes page, id and drp_action where they print into hidden inputs, wraps AJAX filter parameters in encodeURIComponent(). Signed-off-by: Thomas Vincent --- thold.php | 16 +++++------ thold_graph.php | 66 ++++++++++++++++++++++----------------------- thold_templates.php | 2 +- thold_webapi.php | 50 +++++++++++++++++++++++++++------- 4 files changed, 82 insertions(+), 52 deletions(-) diff --git a/thold.php b/thold.php index 0bf86f46..2c684f4a 100644 --- a/thold.php +++ b/thold.php @@ -614,7 +614,7 @@ function list_tholds() { } if (get_request_var('rfilter') != '') { - $sql_where .= ($sql_where == '' ? '(' : ' AND ') . " td.name_cache RLIKE '" . get_request_var('rfilter') . "'"; + $sql_where .= ($sql_where == '' ? '(' : ' AND ') . ' td.name_cache ' . 'RLIKE ' . db_qstr(get_request_var('rfilter')); } if ($statefilter != '') { @@ -763,18 +763,18 @@ function list_tholds() { - '> + '>