mod_c2s: Improve log message in case there are no stream features on offer (thanks hexa)
authorKim Alvefur <zash@zash.se>
Fri, 28 Dec 2018 00:13:03 +0100
changeset 9743 a74d78f79b23
parent 9742 f5aa6fdc935e
child 9744 4b34687ede3f
mod_c2s: Improve log message in case there are no stream features on offer (thanks hexa)
plugins/mod_c2s.lua
--- 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