imapclient: log traces of sensitive data with traceauth, and of bulk data with tracedata

Similar to the imapserver. This also fixes tracing of APPEND messages, which
was completely absent before.
This commit is contained in:
Mechiel Lukkien
2025-02-26 18:13:20 +01:00
parent 9c40205343
commit f235b6ad83
4 changed files with 71 additions and 23 deletions

View File

@ -850,6 +850,7 @@ func (c *Conn) xliteral() []byte {
sync := c.take('+')
c.xtake("}")
c.xcrlf()
// todo: for some literals, read as tracedata
if size > 1<<20 {
c.xerrorf("refusing to read more than 1MB: %d", size)
}