Skip to content

fix(poller): coerce invalid SCRIPT/SCRIPT_PHP output to U in cmd.php#7180

Merged
TheWitness merged 1 commit into
Cacti:1.2.xfrom
somethingwithproof:fix/1.2.x-poller-script-output-u
Jun 3, 2026
Merged

fix(poller): coerce invalid SCRIPT/SCRIPT_PHP output to U in cmd.php#7180
TheWitness merged 1 commit into
Cacti:1.2.xfrom
somethingwithproof:fix/1.2.x-poller-script-output-u

Conversation

@somethingwithproof
Copy link
Copy Markdown
Contributor

The SCRIPT and SCRIPT_PHP collection branches in cmd.php log an invalid (non-numeric, shape-invalid) script/script-server response but leave $output as the raw junk string, unlike the SNMP branch and cmd_realtime.php, which reset it to 'U'. Downstream process_poller_output/boost coerce non-numeric values to U before the RRD update, so this is a consistency/robustness fix (a raw bad value is otherwise stored in poller_output before being discarded), not a security issue. Base: 1.2.x.

The SCRIPT and SCRIPT_PHP branches logged an invalid (non-numeric, shape-invalid)
collector response but left $output as the raw junk, unlike the SNMP branch and
cmd_realtime.php which reset it to 'U'. Mirror them so a bad value is stored as
U rather than a raw string in poller_output.

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
Copilot AI review requested due to automatic review settings May 29, 2026 23:51
@TheWitness TheWitness merged commit 4402384 into Cacti:1.2.x Jun 3, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants