From 73c123a17e8e797f75e8ff0c89c2143dba3d3d8c Mon Sep 17 00:00:00 2001 From: TheWitness Date: Fri, 16 Oct 2026 12:50:40 -0400 Subject: [PATCH] fix: remove trailing comma in device edit SNMP settings UPDATE The UPDATE mac_track_devices statement ended its SET list with a comma before WHERE, causing an SQL syntax error whenever the device edit page auto-corrected the SNMP settings. Adds a regression test. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- CHANGELOG.md | 1 + mactrack_devices.php | 2 +- tests/Unit/DeviceEditSnmpUpdateSqlTest.php | 15 +++++++++++++++ 3 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 tests/Unit/DeviceEditSnmpUpdateSqlTest.php diff --git a/CHANGELOG.md b/CHANGELOG.md index 305c64e7..e08ff91e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,7 @@ * issue: Decode MAC/IP OIDs as hex in the Extreme scanner by correcting a misplaced xform_stripped_oid() argument * issue: Fix an undefined $ifindex reference (should be $ifIndex) in the Nortel Bay scanner * issue: Fix a misplaced parenthesis in the running-process stats parser +* issue: Remove a trailing comma before WHERE in the device edit page's SNMP settings UPDATE, which caused an SQL syntax error whenever the SNMP settings were auto-corrected * security: Move every inline `onClick`/`onChange` handler (filter selects, Return/Cancel buttons, the device rescan icon, the utilities refresh controls) into `$(function() {})` handlers, using delegated handlers in `js/mactrack.js` for markup rendered by shared or AJAX-refreshed code, so pages work under a Content-Security-Policy that blocks inline event-handler attributes; all inline `