aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2018-12-28 00:13:03 +0100
committerKim Alvefur <zash@zash.se>2018-12-28 00:13:03 +0100
commitda5ec59b36188e325ed6dc9fa6ebf8187d492b33 (patch)
tree4292b8ad8adc35c36972822057611a27e7bcc1e7
parentf8bc92174749c64b3804b8ad46f47dfceb107312 (diff)
downloadprosody-da5ec59b36188e325ed6dc9fa6ebf8187d492b33.tar.gz
prosody-da5ec59b36188e325ed6dc9fa6ebf8187d492b33.zip
mod_c2s: Improve log message in case there are no stream features on offer (thanks hexa)
-rw-r--r--plugins/mod_c2s.lua8
1 files changed, 7 insertions, 1 deletions
diff --git a/plugins/mod_c2s.lua b/plugins/mod_c2s.lua
index 8e31a968..36e6a152 100644
--- a/plugins/mod_c2s.lua
+++ b/plugins/mod_c2s.lua
@@ -106,7 +106,13 @@ function stream_callbacks.streamopened(session, attr)
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