mirror of
https://blitiri.com.ar/repos/chasquid
synced 2026-05-01 09:05:27 +00:00
maillog: Fix empty lines in the authentication log entries
In maillog.Auth, we currently have a newline in the log entry args. The blitiri.com.ar/go/log package handles trailing newlines, but only in the format parameter, not in the args. Because of this, the authentication log entries in the maillog currently end with an extra newline. This patch fixes the problem by removing the unnecessary newline from the message. https://github.com/albertito/chasquid/pull/82 Amended-by: Alberto Bertogli <albertito@blitiri.com.ar> Adjusted commit message.
This commit is contained in:
@@ -96,7 +96,7 @@ func (l *Logger) Auth(netAddr net.Addr, user string, successful bool) {
|
||||
if !successful {
|
||||
res = "failed"
|
||||
}
|
||||
msg := fmt.Sprintf("%s auth %s for %s\n", netAddr, res, user)
|
||||
msg := fmt.Sprintf("%s auth %s for %s", netAddr, res, user)
|
||||
l.printf("%s", msg)
|
||||
authLog.Debugf("%s", msg)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user