Gesa Stupperich cd66071731 ssh/tailssh: skip policy compliance check pre-auth
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>
2026-02-04 10:43:33 +00:00
..