git » chasquid » commit dbe3843

chasquid: Redact AUTH parameters in debug logs

author Alberto Bertogli
2016-10-08 11:14:06 UTC
committer Alberto Bertogli
2016-10-09 23:51:05 UTC
parent 7403dbb8a35298afa993cd21686802ba760f3468

chasquid: Redact AUTH parameters in debug logs

chasquid.go +5 -1

diff --git a/chasquid.go b/chasquid.go
index c0816ff..1ed8087 100644
--- a/chasquid.go
+++ b/chasquid.go
@@ -472,7 +472,11 @@ loop:
 			break
 		}
 
-		c.tr.Debugf("-> %s %s", cmd, params)
+		if cmd == "AUTH" {
+			c.tr.Debugf("-> AUTH <redacted>")
+		} else {
+			c.tr.Debugf("-> %s %s", cmd, params)
+		}
 
 		var code int
 		var msg string