aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/muc/muc.lib.lua
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2018-08-07 13:32:11 +0100
committerMatthew Wild <mwild1@gmail.com>2018-08-07 13:32:11 +0100
commitb52b6bea406793d3474abf385d0c3abfe7b01dc6 (patch)
tree8018066bb82313e0d40c9658111c8363908c7496 /plugins/muc/muc.lib.lua
parent85d9a2d09c32d6d8326e63242cf69c976b21d38f (diff)
downloadprosody-b52b6bea406793d3474abf385d0c3abfe7b01dc6.tar.gz
prosody-b52b6bea406793d3474abf385d0c3abfe7b01dc6.zip
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.
Diffstat (limited to 'plugins/muc/muc.lib.lua')
-rw-r--r--plugins/muc/muc.lib.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/muc/muc.lib.lua b/plugins/muc/muc.lib.lua
index d12f24b1..5a25cf81 100644
--- a/plugins/muc/muc.lib.lua
+++ b/plugins/muc/muc.lib.lua
@@ -362,7 +362,7 @@ function room_mt:handle_kickable(origin, stanza) -- luacheck: ignore 212
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"})