Diff

plugins/mod_s2s/mod_s2s.lua @ 10311:1bb1e16f24b0

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.
author Kim Alvefur <zash@zash.se>
date Sun, 06 Oct 2019 21:14:53 +0200
parent 10249:790c6ae54dd6
child 10381:66fa45d24481
line wrap: on
line diff
--- a/plugins/mod_s2s/mod_s2s.lua	Sun Oct 06 19:35:35 2019 +0200
+++ b/plugins/mod_s2s/mod_s2s.lua	Sun Oct 06 21:14:53 2019 +0200
@@ -184,7 +184,10 @@
 			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);