bugfix: trim xml import payload value before emptiness check#272
Open
somethingwithproof wants to merge 1 commit intoCacti:developfrom
Open
bugfix: trim xml import payload value before emptiness check#272somethingwithproof wants to merge 1 commit intoCacti:developfrom
somethingwithproof wants to merge 1 commit intoCacti:developfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes a long-standing operator-precedence bug in the Syslog plugin’s XML import handlers so that whitespace-only import_text payloads are treated as empty (instead of incorrectly passing the check), and adds a regression test plus changelog entry for issue #269.
Changes:
- Corrected the
import_textemptiness check to trim the request value before comparing in alert/report/removal import handlers. - Added a regression script to detect reintroduction of the legacy buggy pattern across the three handlers.
- Updated the changelog to note issue #269.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
syslog_alerts.php |
Fixes the import_text trim/compare condition in alert_import() |
syslog_reports.php |
Fixes the import_text trim/compare condition in report_import() |
syslog_removal.php |
Fixes the import_text trim/compare condition in removal_import() |
tests/regression/issue269_import_text_trim_check_test.php |
Adds a regression check to ensure the legacy buggy pattern is not present |
CHANGELOG.md |
Documents issue #269 in the develop section |
Contributor
Author
|
Fixed -- |
74b6927 to
a718125
Compare
somethingwithproof
added a commit
to somethingwithproof/plugin_syslog
that referenced
this pull request
Mar 10, 2026
Refs Cacti#272 Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
a718125 to
d55cae3
Compare
somethingwithproof
added a commit
to somethingwithproof/plugin_syslog
that referenced
this pull request
Mar 15, 2026
Refs Cacti#272 Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
d55cae3 to
c81c438
Compare
TheWitness
previously approved these changes
Mar 16, 2026
Refs Cacti#272 Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
a152c5f to
b577308
Compare
TheWitness
approved these changes
Mar 17, 2026
Member
TheWitness
left a comment
There was a problem hiding this comment.
We use only print, not echo. This may not pass the phpcsfixer. Let's see.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #269
Validation