Software /
code /
prosody
Diff
plugins/mod_saslauth.lua @ 8511:dd7b8888636e
mod_saslauth: Pass SASL EXTERNAL failure reason on to be used in error bounces
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sun, 04 Feb 2018 01:01:50 +0100 |
parent | 8510:149e98f88680 |
child | 8512:e924a99fd435 |
line wrap: on
line diff
--- a/plugins/mod_saslauth.lua Sun Feb 04 00:58:38 2018 +0100 +++ b/plugins/mod_saslauth.lua Sun Feb 04 01:01:50 2018 +0100 @@ -110,11 +110,12 @@ 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)