do not log yamux buffers without sanitization (trace log level) (#1046)

This commit is contained in:
Etan Kissling 2024-03-04 00:04:37 +01:00 committed by GitHub
parent 1609fd7197
commit d43c5feab0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -538,7 +538,7 @@ method handle*(m: Yamux) {.async.} =
if header.length > 0:
var buffer = newSeqUninitialized[byte](header.length)
await m.connection.readExactly(addr buffer[0], int(header.length))
trace "Msg Rcv", msg=string.fromBytes(buffer)
trace "Msg Rcv", msg=shortLog(buffer)
await channel.gotDataFromRemote(buffer)
if MsgFlags.Fin in header.flags: