Diff

plugins/mod_saslauth.lua @ 8510:149e98f88680

mod_saslauth: Close connection if no fallback kicks in on SASL EXTERNAL failure
author Kim Alvefur <zash@zash.se>
date Sun, 04 Feb 2018 00:58:38 +0100
parent 8509:e1d274001855
child 8511:dd7b8888636e
line wrap: on
line diff
--- a/plugins/mod_saslauth.lua	Sun Feb 04 01:13:27 2018 +0100
+++ b/plugins/mod_saslauth.lua	Sun Feb 04 00:58:38 2018 +0100
@@ -113,7 +113,9 @@
 end, 500)
 
 module:hook_stanza(xmlns_sasl, "failure", function (session, stanza)
-	-- TODO: Dialback wasn't loaded.  Do something useful.
+	session.log("debug", "No fallback from SASL EXTERNAL failure, giving up");
+	session:close();
+	return true;
 end, 90)
 
 module:hook_tag("http://etherx.jabber.org/streams", "features", function (session, stanza)