fix(ppsk sync): match by name + salvage settings, prune dup tombstones
Every rotation changes an embedded PPSK's synthetic id (it's derived from sha256(wlan_id : passphrase)). The ingest sync matched only by unifi_id, so after rotation the row's id was "new" — the sync created a fresh active row and marked the previous one held. Over multiple rotations this accumulated: each rotation left a held tombstone, and the rotate_password / schedule flags were stuck on the original tombstone instead of transferring to the new active row. Dev's GUEST PPSK had 3 rows after a few rotations: two held (with rotate_password=true on the first), one active with rotate=false. Future rotations would silently skip that PPSK because the active row no longer had the rotate flag set. Fix in three layers, all in WifiController::ppskIndex: 1. Match priority extended: unifi_id → name within wlan → held by passphrase. The name match means a passphrase change just updates the existing row in place. No more new-row creation per rotation. 2. Salvage step before pruning: for each active row, scan held tombstones with the same name and copy over rotate_password and schedule. Operator's rotation opt-in survives history. 3. Prune step: held rows with the same name as an active row in the same wlan are now hard-deleted (their settings were just salvaged, their data is stale). Keeps the WiFi modal clean instead of accumulating phantoms. v1.10.2. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "dashboard/unifi",
|
||||
"description": "UniFi network management, WiFi stats, and captive portal authentication for the Dashboard platform",
|
||||
"version": "1.10.1",
|
||||
"version": "1.10.2",
|
||||
"type": "library",
|
||||
"license": "MIT",
|
||||
"autoload": {
|
||||
|
||||
Reference in New Issue
Block a user