mod_c2s: Improve log message in case there are no stream features on offer (thanks hexa)
--- 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