Changeset

9145:51c5dd7a8ab9

MUC: Suppress error text when participants are kicked due to error in semi-anon rooms (fixes #563) This prevents information leaks (such as the occupant's server domain) which may be included in error messages.
author Matthew Wild <mwild1@gmail.com>
date Tue, 07 Aug 2018 13:32:11 +0100
parents 9144:b40efef8ec99
children 9146:6bd3602a70e2
files plugins/muc/muc.lib.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/muc/muc.lib.lua	Tue Aug 07 10:52:10 2018 +0200
+++ b/plugins/muc/muc.lib.lua	Tue Aug 07 13:32:11 2018 +0100
@@ -362,7 +362,7 @@
 	if occupant == nil then return nil; end
 	local type, condition, text = stanza:get_error();
 	local error_message = "Kicked: "..(condition and condition:gsub("%-", " ") or "presence error");
-	if text then
+	if text and room:get_whois() == "anyone" then
 		error_message = error_message..": "..text;
 	end
 	occupant:set_session(real_jid, st.presence({type="unavailable"})