From b2adf2d2583cbbe0ab8a048806557bb125075b58 Mon Sep 17 00:00:00 2001 From: Valentin Lab Date: Tue, 3 Nov 2015 13:49:20 +0800 Subject: [PATCH] fix: avoid writing password to log Github-fix: #266 Signed-off-by: Valentin Lab Signed-off-by: Nicolas Sebrecht --- offlineimap/imapserver.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/offlineimap/imapserver.py b/offlineimap/imapserver.py index 6cdbf26..5cb1be4 100644 --- a/offlineimap/imapserver.py +++ b/offlineimap/imapserver.py @@ -206,7 +206,8 @@ class IMAPServer: authz = self.user_identity NULL = u'\x00' 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