headscale/hscontrol/state
Kristoffer Dalby ce7c256d1e state: set User pointer during tagged→user-owned conversion
processReauthTags sets UserID when converting a tagged node to
user-owned, but does not set the User pointer. When the node was
registered with a tags-only PreAuthKey (User: nil), the in-memory
NodeStore cache holds a node with User=nil. The mapper's
generateUserProfiles then calls node.Owner().Model().ID, which
dereferences the nil pointer and panics.

Set node.User alongside node.UserID in processReauthTags. Also add
defensive nil checks in generateUserProfiles to gracefully handle
nodes with invalid owners rather than panicking.

Fixes #3038
2026-02-04 15:44:55 +01:00
..
debug.go db: use PolicyManager for RequestTags migration 2026-01-21 15:10:29 +01:00
debug_test.go hscontrol/state: make NodeStore batch configuration tunable (#2886) 2025-11-28 16:38:29 +01:00
endpoint_test.go hscontrol/state: make NodeStore batch configuration tunable (#2886) 2025-11-28 16:38:29 +01:00
ephemeral_test.go hscontrol/state: make NodeStore batch configuration tunable (#2886) 2025-11-28 16:38:29 +01:00
maprequest.go stability and race conditions in auth and node store (#2781) 2025-10-16 12:17:43 +02:00
maprequest_test.go make tags first class node owner (#2885) 2025-12-02 12:01:25 +01:00
node_store.go cli: ensure tagged-devices is included in profile list (#2991) 2026-01-09 16:31:23 +01:00
node_store_test.go policy: more accurate node change 2025-12-16 10:12:36 +01:00
state.go state: set User pointer during tagged→user-owned conversion 2026-02-04 15:44:55 +01:00
tags.go Conversion from personal to tagged node is reversible 2026-01-24 17:18:59 +01:00
test_helpers.go hscontrol/state: make NodeStore batch configuration tunable (#2886) 2025-11-28 16:38:29 +01:00