From 608f9eb69d1d4a157efc80d7bdcf3a569b940e77 Mon Sep 17 00:00:00 2001 From: Thomas Vincent Date: Fri, 28 Aug 2026 01:05:42 -0700 Subject: [PATCH 1/4] Make PHP 8 HTML escaping behavior explicit --- CHANGELOG.md | 1 + setup.php | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7a22b427..c49c74bc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ --- develop --- +* issue: Make HTML escaping behavior explicit across PHP 8 versions * issue#199: Duplicate Partition name errors * issue#250: Fix date filter persistence by validating before shift_span detection * issue#252: hardening: escape device hostname output in syslog view; parameterize alert API functions diff --git a/setup.php b/setup.php index 46d0333d..367a8fa8 100644 --- a/setup.php +++ b/setup.php @@ -1592,7 +1592,9 @@ function syslog_graph_buttons($graph_elements = []) { $host_id = syslog_db_fetch_cell_prepared('SELECT host_id FROM syslog_hosts ' . $sql_where, $sql_params); if ($host_id) { - print "
"; + $url = $config['url_path'] . 'plugins/syslog/syslog.php?tab=syslog&reset=1&host=' . $host_id . '&date1=' . $date1 . '&date2=' . $date2; + + print "
"; } } } From 2f84829224c65f83fc1af4b546a165d50e647a39 Mon Sep 17 00:00:00 2001 From: Thomas Vincent Date: Sun, 30 Aug 2026 18:06:57 -0700 Subject: [PATCH 2/4] ci: test PHP 8.2-8.4 against Cacti and add ondrej PPA for apache mod Cacti core now requires PHP >= 8.2, so the 8.1 integration job fails the composer platform check; Ubuntu Noble also lacks libapache2-mod-php for non-native versions without the ondrej PPA. Signed-off-by: Thomas Vincent --- .github/workflows/plugin-ci-workflow.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/plugin-ci-workflow.yml b/.github/workflows/plugin-ci-workflow.yml index 86237dcf..f24a1253 100644 --- a/.github/workflows/plugin-ci-workflow.yml +++ b/.github/workflows/plugin-ci-workflow.yml @@ -96,7 +96,7 @@ jobs: strategy: fail-fast: false matrix: - php: ['8.1', '8.2', '8.3'] + php: ['8.2', '8.3'] os: [ubuntu-latest] services: @@ -140,7 +140,9 @@ jobs: run: php -v - name: Run apt-get update - run: sudo apt-get update + run: | + sudo add-apt-repository -y ppa:ondrej/php + sudo apt-get update - name: Install System Dependencies run: sudo apt-get install -y apache2 snmp snmpd rrdtool fping libapache2-mod-php${{ matrix.php }} From 918f227689ce3a074685085c97c7f50e22d33ac7 Mon Sep 17 00:00:00 2001 From: Thomas Vincent Date: Fri, 4 Sep 2026 18:26:15 -0700 Subject: [PATCH 3/4] compat: escape the syslog range link title attribute Signed-off-by: Thomas Vincent --- setup.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.php b/setup.php index 367a8fa8..0698c453 100644 --- a/setup.php +++ b/setup.php @@ -1594,7 +1594,7 @@ function syslog_graph_buttons($graph_elements = []) { if ($host_id) { $url = $config['url_path'] . 'plugins/syslog/syslog.php?tab=syslog&reset=1&host=' . $host_id . '&date1=' . $date1 . '&date2=' . $date2; - print "
"; + print "
"; } } } From e966338d08d86227bd1915fe71a925fd755d2b5c Mon Sep 17 00:00:00 2001 From: Thomas Vincent Date: Fri, 4 Sep 2026 18:27:13 -0700 Subject: [PATCH 4/4] ci: restore PHP 8.1 to the syslog integration matrix Install software-properties-common before add-apt-repository so the ondrej PPA step does not depend on an undeclared runner image package. Signed-off-by: Thomas Vincent --- .github/workflows/plugin-ci-workflow.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/plugin-ci-workflow.yml b/.github/workflows/plugin-ci-workflow.yml index f24a1253..e7107fab 100644 --- a/.github/workflows/plugin-ci-workflow.yml +++ b/.github/workflows/plugin-ci-workflow.yml @@ -96,7 +96,7 @@ jobs: strategy: fail-fast: false matrix: - php: ['8.2', '8.3'] + php: ['8.1', '8.2', '8.3'] os: [ubuntu-latest] services: @@ -139,8 +139,10 @@ jobs: - name: Check PHP version run: php -v - - name: Run apt-get update + - name: Add the ondrej PHP repository run: | + sudo apt-get update + sudo apt-get install -y software-properties-common sudo add-apt-repository -y ppa:ondrej/php sudo apt-get update