Repository navigation
hardening: escape site and device names, neutralise CSV exports, use the SNMP API for Cabletron - #463
Merged
Merged
Conversation
…MP item actions Escape site and device names on output in views, option lists, edit headers and the MAC authorization emails, escape values from uploaded CSV files in the import results, neutralise spreadsheet formula prefixes in CSV exports, read the Cabletron port table through the Cacti SNMP API instead of a command line, and require POST for SNMP option item reorder and removal. Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
|
TheWitness
approved these changes
Nov 20, 2026
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.



form_selectable_ecellin the views; the option lists, edit headers and the MAC delete list; and the MACAUTH report and MAC watch email substitutions.mactrack_csv_cell()prefixes'to text that starts with= + - @, tab or CR, and doubles embedded quotes. It is applied to all 13 export row builders. It is a local helper because the plugin supports Cacti 1.2.29.cacti_snmp_walk()instead of ansnmpgetnextloop throughexec(). The walk stays inside the port subtree and also works with SNMP v3. This could not be tested against Cabletron hardware.item_moveup,item_movedownanditem_removenow require POST through the existingmactrack_require_post(). Removal also checks that the item belongs to the option set. The links now POST with the CSRF token fromjs/mactrack_snmp.js.Tests:
tests/Security/SiteDeviceNameEscapingTest.phpis new, and the two tests that asserted the old command-line escaping now assert there is no command line. Full suite: 1149 passed, 14 skipped, 2 failed. Both failures are inAdminActionsRequirePostTest, which needs/bin/trueand fails the same way ondevelop. The browser path for the item actions was not run.Fixes #462