diff options
author | mathieui <mathieui@mathieui.net> | 2015-10-02 19:07:45 +0200 |
---|---|---|
committer | mathieui <mathieui@mathieui.net> | 2015-10-02 19:07:45 +0200 |
commit | ada9444bf84bd238238c4d22561f69184dd22cdd (patch) | |
tree | ceb4f86446b4129ec22cb348f1cb1bd7a151e2da /slixmpp/features/feature_mechanisms/mechanisms.py | |
parent | 1100ff1febf7e605e03fd9565bdac5fdaa3bf1e0 (diff) | |
parent | acc52fd935b7e74919ad748f3a630596f66c62af (diff) | |
download | slixmpp-ada9444bf84bd238238c4d22561f69184dd22cdd.tar.gz slixmpp-ada9444bf84bd238238c4d22561f69184dd22cdd.tar.bz2 slixmpp-ada9444bf84bd238238c4d22561f69184dd22cdd.tar.xz slixmpp-ada9444bf84bd238238c4d22561f69184dd22cdd.zip |
Merge branch 'sleek-merge'
Diffstat (limited to 'slixmpp/features/feature_mechanisms/mechanisms.py')
-rw-r--r-- | slixmpp/features/feature_mechanisms/mechanisms.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/slixmpp/features/feature_mechanisms/mechanisms.py b/slixmpp/features/feature_mechanisms/mechanisms.py index 5f947cfa..8e507afc 100644 --- a/slixmpp/features/feature_mechanisms/mechanisms.py +++ b/slixmpp/features/feature_mechanisms/mechanisms.py @@ -190,14 +190,14 @@ class FeatureMechanisms(BasePlugin): except sasl.SASLCancelled: self.attempted_mechs.add(self.mech.name) self._send_auth() - except sasl.SASLFailed: - self.attempted_mechs.add(self.mech.name) - self._send_auth() except sasl.SASLMutualAuthFailed: log.error("Mutual authentication failed! " + \ "A security breach is possible.") self.attempted_mechs.add(self.mech.name) self.xmpp.disconnect() + except sasl.SASLFailed: + self.attempted_mechs.add(self.mech.name) + self._send_auth() else: resp.send() @@ -210,13 +210,13 @@ class FeatureMechanisms(BasePlugin): resp['value'] = self.mech.process(stanza['value']) except sasl.SASLCancelled: self.stanza.Abort(self.xmpp).send() - except sasl.SASLFailed: - self.stanza.Abort(self.xmpp).send() except sasl.SASLMutualAuthFailed: log.error("Mutual authentication failed! " + \ "A security breach is possible.") self.attempted_mechs.add(self.mech.name) self.xmpp.disconnect() + except sasl.SASLFailed: + self.stanza.Abort(self.xmpp).send() else: if resp.get_value() == '': resp.del_value() |