diff options
author | Sangeeth Saravanaraj <sangeeth@riptideio.com> | 2015-04-28 16:53:40 +0530 |
---|---|---|
committer | Sangeeth Saravanaraj <sangeeth@riptideio.com> | 2015-04-28 16:53:40 +0530 |
commit | 80b60fc0483b21c8d5829b61cabbf9b46aa2c2fb (patch) | |
tree | ecb5905d19a563b4e6fe864afd0122321bf7cea1 /sleekxmpp/features/feature_mechanisms/mechanisms.py | |
parent | 904480712157d762d35de16ce55202d641a56b3c (diff) | |
parent | 842157a6cc25d9e85e6e31b3cf3349ba83ece101 (diff) | |
download | slixmpp-80b60fc0483b21c8d5829b61cabbf9b46aa2c2fb.tar.gz slixmpp-80b60fc0483b21c8d5829b61cabbf9b46aa2c2fb.tar.bz2 slixmpp-80b60fc0483b21c8d5829b61cabbf9b46aa2c2fb.tar.xz slixmpp-80b60fc0483b21c8d5829b61cabbf9b46aa2c2fb.zip |
Merge remote-tracking branch 'origin/develop' into xep_0332
Diffstat (limited to 'sleekxmpp/features/feature_mechanisms/mechanisms.py')
-rw-r--r-- | sleekxmpp/features/feature_mechanisms/mechanisms.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sleekxmpp/features/feature_mechanisms/mechanisms.py b/sleekxmpp/features/feature_mechanisms/mechanisms.py index 17ad5ed0..1d8f8798 100644 --- a/sleekxmpp/features/feature_mechanisms/mechanisms.py +++ b/sleekxmpp/features/feature_mechanisms/mechanisms.py @@ -187,14 +187,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(now=True) @@ -207,13 +207,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() |