summaryrefslogtreecommitdiff
path: root/mail/src/leap
diff options
context:
space:
mode:
authorKali Kaneko <kali@leap.se>2013-08-13 17:31:22 +0200
committerKali Kaneko <kali@leap.se>2013-08-13 17:35:50 +0200
commit3f33ca62d76986ab9471cf96e8e520f6ca4477df (patch)
tree2944119d5f10cc77723a9226365b44ad4936b8b9 /mail/src/leap
parent162e0e2e10bfaf26a5b3414c57790bd063401373 (diff)
avoid logging dummy password
Diffstat (limited to 'mail/src/leap')
-rw-r--r--mail/src/leap/mail/imap/service/imap.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/mail/src/leap/mail/imap/service/imap.py b/mail/src/leap/mail/imap/service/imap.py
index a4ffed6c..1a8c15cf 100644
--- a/mail/src/leap/mail/imap/service/imap.py
+++ b/mail/src/leap/mail/imap/service/imap.py
@@ -17,6 +17,8 @@
"""
Imap service initialization
"""
+from copy import copy
+
import logging
logger = logging.getLogger(__name__)
@@ -71,7 +73,13 @@ class LeapIMAPServer(imap4.IMAP4Server):
#self.theAccount = theAccount
def lineReceived(self, line):
- log.msg('rcv: %s' % line)
+ if "login" in line:
+ # avoid to log the pass, even though we are using a dummy auth
+ # by now.
+ msg = line[:7] + " [...]"
+ else:
+ msg = copy(line)
+ log.msg('rcv: %s' % msg)
imap4.IMAP4Server.lineReceived(self, line)
def authenticateLogin(self, username, password):