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 | 5460dfed75e36009063b3f0af2b3f9fd0f920837 (patch) | |
tree | de9f229b795e3472c113f846d91300518b03ce04 /plugins/mod_s2s/mod_s2s.lua | |
parent | 7b43531fa9779ba0ec001e87cbe5004cc8e303f1 (diff) | |
download | prosody-5460dfed75e36009063b3f0af2b3f9fd0f920837.tar.gz prosody-5460dfed75e36009063b3f0af2b3f9fd0f920837.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); |