mirror of
https://github.com/tailscale/tailscale.git
synced 2026-02-09 09:41:49 +01:00
When the OnPolicyChange handler is called before authentication has completed, the localUser field on the connection may not have been populated yet, which leads to a nil pointer dereference when OnPolicyChange tries to read it. In order to avoid this, we skip the validation when the localUser is empty (something we're already doing when the info field is empty). The authentication will check compliance with the policy once it completes. Updates tailscale/corp#36268 Signed-off-by: Gesa Stupperich <gesa@tailscale.com>