Software /
code /
prosody
Changeset
3548:cd8d1cacc65b
mod_saslauth: Handle SASL <abort/> properly.
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Tue, 02 Nov 2010 15:07:25 +0500 |
parents | 3547:3242e70f1058 |
children | 3549:395d5bb5266e |
files | plugins/mod_saslauth.lua |
diffstat | 1 files changed, 6 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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' };