ssh/tailssh: fix observed crash in Tailscale SSH

Updates tailscale/corp#36268

Change-Id: Ie9da0da59808a5475dc41c67376ee73ccd254486
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
Brad Fitzpatrick 2026-01-23 07:07:18 -08:00
parent 63d563e734
commit d720330c32

View File

@ -736,7 +736,7 @@ func (c *conn) isStillValid() bool {
if !a.Accept && a.HoldAndDelegate == "" {
return false
}
return c.localUser.Username == localUser
return c.localUser != nil && c.localUser.Username == localUser
}
// checkStillValid checks that the conn is still valid per the latest SSHPolicy.