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 | e00503705b568cd532f38373fde34757bc580296 (patch) | |
tree | c1e8af511e9304c5ff7969bc903602cfe7c0294d /plugins/mod_saslauth.lua | |
parent | 0e96df74102467122e107756073053abd96b9670 (diff) | |
download | prosody-e00503705b568cd532f38373fde34757bc580296.tar.gz prosody-e00503705b568cd532f38373fde34757bc580296.zip |
mod_saslauth: Pass SASL EXTERNAL failure reason on to be used in error bounces
Diffstat (limited to 'plugins/mod_saslauth.lua')
-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) |