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 | e35df6a826d331bccf5d0b0b1efe9e090d519edf (patch) | |
tree | c1e8af511e9304c5ff7969bc903602cfe7c0294d /plugins/mod_saslauth.lua | |
parent | 2eaeafce6a215934aa5826cb011ad19141af76b1 (diff) | |
download | prosody-e35df6a826d331bccf5d0b0b1efe9e090d519edf.tar.gz prosody-e35df6a826d331bccf5d0b0b1efe9e090d519edf.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) |