Files
Jacky 78926fbde4 fix: scope DestroyUser to only delete target user's pre-auth keys
DestroyUser called ListPreAuthKeys(tx) which returns ALL keys in the
database, then deleted every one of them. This caused deleting any
single user to wipe all pre-auth keys system-wide.

Fix: query only keys belonging to the user being deleted using
tx.Where("user_id = ?", uid).Find(&keys).

Fixes: https://github.com/juanfont/headscale/issues/3154
2026-04-05 14:24:01 +09:00
..