diff options
author | Kim Alvefur <zash@zash.se> | 2018-02-04 01:01:50 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2018-02-04 01:01:50 +0100 |
commit | e925f5a34a7b77f0da480c46f2c81204626126c0 (patch) | |
tree | c1e8af511e9304c5ff7969bc903602cfe7c0294d /plugins | |
parent | 477f77e250da47f9160c524101ab3e1efcae9dc8 (diff) | |
download | prosody-e925f5a34a7b77f0da480c46f2c81204626126c0.tar.gz prosody-e925f5a34a7b77f0da480c46f2c81204626126c0.zip |
mod_saslauth: Pass SASL EXTERNAL failure reason on to be used in error bounces
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/mod_saslauth.lua | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/plugins/mod_saslauth.lua b/plugins/mod_saslauth.lua index 3ca709e0..3eda2a24 100644 --- a/plugins/mod_saslauth.lua +++ b/plugins/mod_saslauth.lua @@ -110,11 +110,12 @@ 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.external_auth_failure_reason = condition; end, 500) module:hook_stanza(xmlns_sasl, "failure", function (session, stanza) session.log("debug", "No fallback from SASL EXTERNAL failure, giving up"); - session:close(); + session:close(nil, session.external_auth_failure_reason); return true; end, 90) |