# HG changeset patch # User Kim Alvefur # Date 1411474981 -7200 # Node ID 89c42aff8510d3544334ddf273173ce40f719ed2 # Parent 6d4d87a89026bf785cc6a974f5a2138433f52da3 mod_dialback, mod_saslauth: Remove broken fallback to dialback on SASL EXTERNAL failure diff -r 6d4d87a89026 -r 89c42aff8510 plugins/mod_dialback.lua --- a/plugins/mod_dialback.lua Tue Sep 23 00:23:33 2014 +0200 +++ b/plugins/mod_dialback.lua Tue Sep 23 14:23:01 2014 +0200 @@ -176,14 +176,6 @@ end end); -module:hook_stanza("urn:ietf:params:xml:ns:xmpp-sasl", "failure", function (origin, stanza) - if origin.external_auth == "failed" then - module:log("debug", "SASL EXTERNAL failed, falling back to dialback"); - initiate_dialback(origin); - return true; - end -end, 100); - module:hook_stanza(xmlns_stream, "features", function (origin, stanza) if not origin.external_auth or origin.external_auth == "failed" then module:log("debug", "Initiating dialback..."); diff -r 6d4d87a89026 -r 89c42aff8510 plugins/mod_saslauth.lua --- a/plugins/mod_saslauth.lua Tue Sep 23 00:23:33 2014 +0200 +++ b/plugins/mod_saslauth.lua Tue Sep 23 14:23:01 2014 +0200 @@ -99,12 +99,10 @@ module:log("info", "SASL EXTERNAL with %s failed", session.to_host) -- TODO: Log the failure reason session.external_auth = "failed" + session:close(); + return true; end, 500) -module:hook_stanza(xmlns_sasl, "failure", function (session, stanza) - -- TODO: Dialback wasn't loaded. Do something useful. -end, 90) - module:hook_stanza("http://etherx.jabber.org/streams", "features", function (session, stanza) if session.type ~= "s2sout_unauthed" or not session.secure then return; end