diff options
author | Tomás Touceda <chiiph@leap.se> | 2014-01-09 17:35:14 -0300 |
---|---|---|
committer | Tomás Touceda <chiiph@leap.se> | 2014-01-09 17:35:14 -0300 |
commit | 3e447f6e281313de5926e1438ccff64bb298e879 (patch) | |
tree | 1df447e7927b404f0fd088b83ff9aa725cfc168a /mail/src/leap | |
parent | b6bc40e8e3c32cecf80dc7b9d5d64209e0a018a5 (diff) | |
parent | cc01116b337d9568352bb3791694f1c68d8d7ed8 (diff) |
Merge remote-tracking branch 'refs/remotes/kali/bug/4925_close_session' into develop
Diffstat (limited to 'mail/src/leap')
-rw-r--r-- | mail/src/leap/mail/imap/account.py | 1 | ||||
-rw-r--r-- | mail/src/leap/mail/imap/service/imap.py | 12 |
2 files changed, 4 insertions, 9 deletions
diff --git a/mail/src/leap/mail/imap/account.py b/mail/src/leap/mail/imap/account.py index 8f5b57b..215564e 100644 --- a/mail/src/leap/mail/imap/account.py +++ b/mail/src/leap/mail/imap/account.py @@ -63,6 +63,7 @@ class SoledadBackedAccount(WithMsgFields, IndexedDB, MBoxParser): _soledad = None selected = None + closed = False def __init__(self, account_name, soledad=None): """ diff --git a/mail/src/leap/mail/imap/service/imap.py b/mail/src/leap/mail/imap/service/imap.py index 234996d..dfd4862 100644 --- a/mail/src/leap/mail/imap/service/imap.py +++ b/mail/src/leap/mail/imap/service/imap.py @@ -71,15 +71,6 @@ class LeapIMAPServer(imap4.IMAP4Server): # populate the test account properly (and only once # per session) - # theAccount = SoledadBackedAccount( - # user, soledad=soledad) - - # --------------------------------- - # XXX pre-populate acct for tests!! - # populate_test_account(theAccount) - # --------------------------------- - #self.theAccount = theAccount - def lineReceived(self, line): """ Attempt to parse a single line from the server. @@ -88,6 +79,9 @@ class LeapIMAPServer(imap4.IMAP4Server): :type line: str """ print "RECV: STATE (%s)" % self.state + if self.theAccount.closed is True and self.state != "unauth": + log.msg("Closing the session. State: unauth") + self.state = "unauth" if "login" in line.lower(): # avoid to log the pass, even though we are using a dummy auth |