# HG changeset patch # User Waqas Hussain # Date 1288692445 -18000 # Node ID cd8d1cacc65b04e713534d7515aa75ac9d6b7aa2 # Parent 3242e70f1058b31bc127c1331c239b198cc0d535 mod_saslauth: Handle SASL properly. diff -r 3242e70f1058 -r cd8d1cacc65b plugins/mod_saslauth.lua --- a/plugins/mod_saslauth.lua Tue Nov 02 04:29:54 2010 +0500 +++ b/plugins/mod_saslauth.lua Tue Nov 02 15:07:25 2010 +0500 @@ -119,8 +119,13 @@ end module:hook("stanza/urn:ietf:params:xml:ns:xmpp-sasl:auth", sasl_handler); -module:hook("stanza/urn:ietf:params:xml:ns:xmpp-sasl:abort", sasl_handler); module:hook("stanza/urn:ietf:params:xml:ns:xmpp-sasl:response", sasl_handler); +module:hook("stanza/urn:ietf:params:xml:ns:xmpp-sasl:abort", function(event) + local session = event.origin; + session.sasl_handler = nil; + session.send(build_reply("failure", "aborted")); + return true; +end); local mechanisms_attr = { xmlns='urn:ietf:params:xml:ns:xmpp-sasl' }; local bind_attr = { xmlns='urn:ietf:params:xml:ns:xmpp-bind' };