ipn: don't log IPN messages that may contain an authkey.

Signed-off-by: David Anderson <danderson@tailscale.com>
pull/2910/head
David Anderson 3 years ago committed by Dave Anderson
parent c350321eec
commit 1eabb5b2d9

@ -260,10 +260,10 @@ func (bc *BackendClient) send(cmd Command) {
cmd.Version = version.Long cmd.Version = version.Long
b, err := json.Marshal(cmd) b, err := json.Marshal(cmd)
if err != nil { if err != nil {
log.Fatalf("Failed json.Marshal(cmd): %v\n%#v\n", err, cmd) log.Fatalf("Failed json.Marshal(cmd): %v\n", err)
} }
if bytes.Contains(b, jsonEscapedZero) { if bytes.Contains(b, jsonEscapedZero) {
log.Printf("[unexpected] zero byte in BackendClient.send command: %q", b) log.Printf("[unexpected] zero byte in BackendClient.send command")
} }
bc.sendCommandMsg(b) bc.sendCommandMsg(b)
} }

Loading…
Cancel
Save