aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_dialback.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2018-02-04 01:40:11 +0100
committerKim Alvefur <zash@zash.se>2018-02-04 01:40:11 +0100
commit8aa6920ff52a1ab6191514a164deded4956748f6 (patch)
tree661dfb5bfa698d4ee4646df7df94ac8c78a984a0 /plugins/mod_dialback.lua
parent76ba5218c221ae8d58edddf8b4097966f2e18180 (diff)
parentcf7486984a083cbe6653063814aa893dcae20054 (diff)
downloadprosody-8aa6920ff52a1ab6191514a164deded4956748f6.tar.gz
prosody-8aa6920ff52a1ab6191514a164deded4956748f6.zip
Merge 0.10->trunk
Diffstat (limited to 'plugins/mod_dialback.lua')
-rw-r--r--plugins/mod_dialback.lua10
1 files changed, 9 insertions, 1 deletions
diff --git a/plugins/mod_dialback.lua b/plugins/mod_dialback.lua
index cbff7f67..eddc3209 100644
--- a/plugins/mod_dialback.lua
+++ b/plugins/mod_dialback.lua
@@ -153,7 +153,7 @@ module:hook("stanza/jabber:server:dialback:verify", function(event)
valid = "invalid";
end
if dialback_verifying.destroyed then
- log("warn", "Incoming s2s session %s was closed in the meantime, so we can't notify it of the db result",
+ log("warn", "Incoming s2s session %s was closed in the meantime, so we can't notify it of the dialback result",
tostring(dialback_verifying):match("%w+$"));
else
dialback_verifying.sends2s(
@@ -190,6 +190,14 @@ module:hook("stanza/jabber:server:dialback:result", function(event)
end
end);
+module:hook_tag("urn:ietf:params:xml:ns:xmpp-sasl", "failure", function (origin, stanza) -- luacheck: ignore 212/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_tag(xmlns_stream, "features", function (origin, stanza) -- luacheck: ignore 212/stanza
if not origin.external_auth or origin.external_auth == "failed" then
module:log("debug", "Initiating dialback...");