diff options
author | Kim Alvefur <zash@zash.se> | 2019-10-06 21:14:53 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2019-10-06 21:14:53 +0200 |
commit | aa602d57688607475e3ba37d73df7f8742ca5cdc (patch) | |
tree | de9f229b795e3472c113f846d91300518b03ce04 /plugins/mod_s2s/mod_s2s.lua | |
parent | 7590aa04d61ecb6d8bb5912b3fb2e7a317cc8826 (diff) | |
download | prosody-aa602d57688607475e3ba37d73df7f8742ca5cdc.tar.gz prosody-aa602d57688607475e3ba37d73df7f8742ca5cdc.zip |
mod_s2s: Close with a stream error in case neither SASL or Dialback are available
This both tells the remote server and users who sent any queued stanzas
why it failed.
Diffstat (limited to 'plugins/mod_s2s/mod_s2s.lua')
-rw-r--r-- | plugins/mod_s2s/mod_s2s.lua | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/plugins/mod_s2s/mod_s2s.lua b/plugins/mod_s2s/mod_s2s.lua index 41b1875b..b9c13ef2 100644 --- a/plugins/mod_s2s/mod_s2s.lua +++ b/plugins/mod_s2s/mod_s2s.lua @@ -184,7 +184,10 @@ function module.add_host(module) return true; elseif not session.dialback_verifying then session.log("warn", "No SASL EXTERNAL offer and Dialback doesn't seem to be enabled, giving up"); - session:close(); + session:close({ + condition = "unsupported-feature", + text = "No viable authentication method offered", + }); return false; end end, -1); |