diff options
author | Tomás Touceda <chiiph@leap.se> | 2013-08-13 12:39:40 -0300 |
---|---|---|
committer | Tomás Touceda <chiiph@leap.se> | 2013-08-13 12:39:40 -0300 |
commit | 7cf45f776fcf1d4d401a2fa55d034d2ddffd3591 (patch) | |
tree | 855826dc33a9324abf2732ba7405f3e8b1e18fab /mail/src/leap | |
parent | 162e0e2e10bfaf26a5b3414c57790bd063401373 (diff) | |
parent | 2e3dc39db27dfc024ff8953c2f1505a1d1914934 (diff) |
Merge remote-tracking branch 'kali/bug/3416_do_not_log_pass' into develop
Diffstat (limited to 'mail/src/leap')
-rw-r--r-- | mail/src/leap/mail/imap/server.py | 4 | ||||
-rw-r--r-- | mail/src/leap/mail/imap/service/imap.py | 10 |
2 files changed, 13 insertions, 1 deletions
diff --git a/mail/src/leap/mail/imap/server.py b/mail/src/leap/mail/imap/server.py index 813d8503..51df86eb 100644 --- a/mail/src/leap/mail/imap/server.py +++ b/mail/src/leap/mail/imap/server.py @@ -121,6 +121,9 @@ class IndexedDB(object): leap_assert_type(self.INDEXES, dict) # Ask the database for currently existing indexes. + if not self._soledad: + logger.debug("NO SOLEDAD ON IMAP INITIALIZATION") + return db_indexes = dict(self._soledad.list_indexes()) for name, expression in SoledadBackedAccount.INDEXES.items(): if name not in db_indexes: @@ -788,6 +791,7 @@ class LeapMessage(WithMsgFields): """ return self._doc.content.get(key, None) + class MessageCollection(WithMsgFields, IndexedDB): """ A collection of messages, surprisingly. 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): |