Diff

plugins/mod_c2s.lua @ 9739:a74d78f79b23

mod_c2s: Improve log message in case there are no stream features on offer (thanks hexa)
author Kim Alvefur <zash@zash.se>
date Fri, 28 Dec 2018 00:13:03 +0100
parent 9490:6e4fbd12c11c
child 9784:7fa273f8869e
line wrap: on
line diff
--- a/plugins/mod_c2s.lua	Sat Nov 24 02:24:48 2018 +0100
+++ b/plugins/mod_c2s.lua	Fri Dec 28 00:13:03 2018 +0100
@@ -106,7 +106,13 @@
 	if features.tags[1] or session.full_jid then
 		send(features);
 	else
-		(session.log or log)("warn", "No stream features to offer");
+		if session.secure then
+			-- Normally STARTTLS would be offered
+			(session.log or log)("warn", "No stream features to offer on secure session. Check authentication settings.");
+		else
+			-- Here SASL should be offered
+			(session.log or log)("warn", "No stream features to offer on insecure session. Check encryption and security settings.");
+		end
 		session:close{ condition = "undefined-condition", text = "No stream features to proceed with" };
 	end
 end