Sanitize user submitted values before logging (#2134)

* strip line breaks from user-submitted values before logging

* finish comment
This commit is contained in:
Matt Owens
2022-09-21 13:03:16 -04:00
committed by Gabe Kangas
parent 29972bb4e7
commit 717bbcf2e7
2 changed files with 10 additions and 2 deletions

View File

@@ -355,7 +355,7 @@ func (s *Server) eventReceived(event chatClientEvent) {
s.userNameChanged(event)
default:
log.Debugln(eventType, "event not found:", typecheck)
log.Debugln(logSanitize(fmt.Sprint(eventType)), "event not found:", logSanitize(fmt.Sprint(typecheck)))
}
}