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
commitaa602d57688607475e3ba37d73df7f8742ca5cdc (patch)
treede9f229b795e3472c113f846d91300518b03ce04
parentmod_admin_telnet: xmpp:ping: Log ping time (diff)
downloadprosody-aa602d57688607475e3ba37d73df7f8742ca5cdc.tar.xz
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.
-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 41b1875bd..b9c13ef26 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);