summaryrefslogtreecommitdiff
path: root/sleekxmpp/features
diff options
context:
space:
mode:
authorLance Stout <lancestout@gmail.com>2012-05-14 22:26:06 -0700
committerLance Stout <lancestout@gmail.com>2012-05-14 22:26:06 -0700
commit8a23f28dfa3ac6b97d35cb81bb071cd2802271e8 (patch)
tree9520dc8b36624545f835c10119cb85910785cb9d /sleekxmpp/features
parent9c4886e7467a9f98356d78141e14999a044719ea (diff)
downloadslixmpp-8a23f28dfa3ac6b97d35cb81bb071cd2802271e8.tar.gz
slixmpp-8a23f28dfa3ac6b97d35cb81bb071cd2802271e8.tar.bz2
slixmpp-8a23f28dfa3ac6b97d35cb81bb071cd2802271e8.tar.xz
slixmpp-8a23f28dfa3ac6b97d35cb81bb071cd2802271e8.zip
Add an exception handler for SASLprep failures.
Diffstat (limited to 'sleekxmpp/features')
-rw-r--r--sleekxmpp/features/feature_mechanisms/mechanisms.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/sleekxmpp/features/feature_mechanisms/mechanisms.py b/sleekxmpp/features/feature_mechanisms/mechanisms.py
index b7af81d0..cc3579e8 100644
--- a/sleekxmpp/features/feature_mechanisms/mechanisms.py
+++ b/sleekxmpp/features/feature_mechanisms/mechanisms.py
@@ -129,6 +129,9 @@ class FeatureMechanisms(BasePlugin):
except SASLError:
self.attempted_mechs.add(self.mech.name)
self._send_auth()
+ except UnicodeError as e:
+ log.exception("A credential value did not pass SASLprep.")
+ self.xmpp.disconnect()
else:
resp.send(now=True)
else: