fix: avoid writing password to log

Github-fix: #266
Signed-off-by: Valentin Lab <valentin.lab@kalysto.org>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
This commit is contained in:
Valentin Lab 2015-11-03 13:49:20 +08:00 committed by Nicolas Sebrecht
parent 1becbff786
commit b2adf2d258

View File

@ -206,7 +206,8 @@ class IMAPServer:
authz = self.user_identity authz = self.user_identity
NULL = u'\x00' NULL = u'\x00'
retval = NULL.join((authz, authc, passwd)).encode('utf-8') retval = NULL.join((authz, authc, passwd)).encode('utf-8')
self.ui.debug('imap', '__plainhandler: returning %s' % retval) logsafe_retval = NULL.join((authz, authc, "(passwd hidden for log)")).encode('utf-8')
self.ui.debug('imap', '__plainhandler: returning %s' % logsafe_retval)
return retval return retval