ipn/ipnlocal: perform additional sanity check in diskPath (#9500)

Use filepath.IsLocal to further validate the baseName.

Updates tailscale/corp#14772

Signed-off-by: Joe Tsai <joetsai@digital-static.net>
pull/9506/head
Joe Tsai 1 year ago committed by GitHub
parent 65dc711c76
commit 5473d11caa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -136,6 +136,9 @@ func (s *peerAPIServer) diskPath(baseName string) (fullPath string, ok bool) {
return "", false
}
}
if !filepath.IsLocal(baseName) {
return "", false
}
return filepath.Join(s.rootDir, baseName), true
}

Loading…
Cancel
Save