ensure logs are in bytes for PLAIN authentication

Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
This commit is contained in:
Nicolas Sebrecht 2016-09-21 03:52:21 +02:00
parent 95c82b91be
commit 3d3e66fbb2

View File

@ -221,7 +221,7 @@ class IMAPServer(object):
# in UTF-8.
NULL = b'\x00'
retval = NULL.join((authz, authc, passwd))
logsafe_retval = NULL.join((authz, authc, "(passwd hidden for log)"))
logsafe_retval = NULL.join((authz, authc, b'(passwd hidden for log)'))
self.ui.debug('imap', '__plainhandler: returning %s'% logsafe_retval)
return retval