Add an exception handler for SASLprep failures.

This commit is contained in:
Lance Stout 2012-05-14 22:26:06 -07:00
parent 9c4886e746
commit 8a23f28dfa

View file

@ -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: