aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_dialback.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2018-02-04 01:13:27 +0100
committerKim Alvefur <zash@zash.se>2018-02-04 01:13:27 +0100
commit5a07b39c7fb46f93b4af1288d8c4dfaba9cedbb3 (patch)
treeeb1db9e3063cf59ff25479c0b2b32fe668765f7c /plugins/mod_dialback.lua
parent38060a5ccf530be01713f5055377ff840dd77145 (diff)
downloadprosody-5a07b39c7fb46f93b4af1288d8c4dfaba9cedbb3.tar.gz
prosody-5a07b39c7fb46f93b4af1288d8c4dfaba9cedbb3.zip
Backed out changeset 89c42aff8510: The problem in ejabberd has reportedly been resolved and this change causes more problems than it solves (fixes #1006)
Diffstat (limited to 'plugins/mod_dialback.lua')
-rw-r--r--plugins/mod_dialback.lua8
1 files changed, 8 insertions, 0 deletions
diff --git a/plugins/mod_dialback.lua b/plugins/mod_dialback.lua
index dcbf9448..cc1615cf 100644
--- a/plugins/mod_dialback.lua
+++ b/plugins/mod_dialback.lua
@@ -189,6 +189,14 @@ module:hook("stanza/jabber:server:dialback:result", function(event)
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...");