diff options
author | Waqas Hussain <waqas20@gmail.com> | 2010-11-02 15:07:25 +0500 |
---|---|---|
committer | Waqas Hussain <waqas20@gmail.com> | 2010-11-02 15:07:25 +0500 |
commit | 42756c02be58eeaae3cf55c99b1b1d8604a57ba9 (patch) | |
tree | cb6ee88418c784f06fd7169c385abc5520a49dd6 /plugins | |
parent | 86a10741089db5350ca045ff3057024d170032f7 (diff) | |
download | prosody-42756c02be58eeaae3cf55c99b1b1d8604a57ba9.tar.gz prosody-42756c02be58eeaae3cf55c99b1b1d8604a57ba9.zip |
mod_saslauth: Handle SASL <abort/> properly.
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/mod_saslauth.lua | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/plugins/mod_saslauth.lua b/plugins/mod_saslauth.lua index 94dc8808..85f7fcbf 100644 --- a/plugins/mod_saslauth.lua +++ b/plugins/mod_saslauth.lua @@ -119,8 +119,13 @@ local function sasl_handler(event) 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' }; |