aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2019-10-06 21:14:53 +0200
committerKim Alvefur <zash@zash.se>2019-10-06 21:14:53 +0200
commit5460dfed75e36009063b3f0af2b3f9fd0f920837 (patch)
treede9f229b795e3472c113f846d91300518b03ce04
parent7b43531fa9779ba0ec001e87cbe5004cc8e303f1 (diff)
downloadprosody-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.
-rw-r--r--plugins/mod_s2s/mod_s2s.lua5
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);