aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_saslauth.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_saslauth.lua
parent76ba5218c221ae8d58edddf8b4097966f2e18180 (diff)
parentcf7486984a083cbe6653063814aa893dcae20054 (diff)
downloadprosody-8aa6920ff52a1ab6191514a164deded4956748f6.tar.gz
prosody-8aa6920ff52a1ab6191514a164deded4956748f6.zip
Merge 0.10->trunk
Diffstat (limited to 'plugins/mod_saslauth.lua')
-rw-r--r--plugins/mod_saslauth.lua9
1 files changed, 7 insertions, 2 deletions
diff --git a/plugins/mod_saslauth.lua b/plugins/mod_saslauth.lua
index b5ec4057..fba84ef8 100644
--- a/plugins/mod_saslauth.lua
+++ b/plugins/mod_saslauth.lua
@@ -110,10 +110,15 @@ module:hook_tag(xmlns_sasl, "failure", function (session, stanza)
module:log("info", "SASL EXTERNAL with %s failed: %s", session.to_host, condition);
session.external_auth = "failed"
- session:close();
- return true;
+ session.external_auth_failure_reason = condition;
end, 500)
+module:hook_tag(xmlns_sasl, "failure", function (session, stanza) -- luacheck: ignore 212/stanza
+ session.log("debug", "No fallback from SASL EXTERNAL failure, giving up");
+ session:close(nil, session.external_auth_failure_reason);
+ return true;
+end, 90)
+
module:hook_tag("http://etherx.jabber.org/streams", "features", function (session, stanza)
if session.type ~= "s2sout_unauthed" or not session.secure then return; end