aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2019-09-29 20:48:00 +0200
committerKim Alvefur <zash@zash.se>2019-09-29 20:48:00 +0200
commit23b4bd4c53e2f7bb0ccb85669cb7b3fd4d1fd6fc (patch)
tree0297df47b1815395b08d3f13bf4b84cd95bb9b47
parente180b392eb66201d7d5e8e55ff0b475551d7f9d2 (diff)
downloadprosody-23b4bd4c53e2f7bb0ccb85669cb7b3fd4d1fd6fc.tar.gz
prosody-23b4bd4c53e2f7bb0ccb85669cb7b3fd4d1fd6fc.zip
MUC: Strip tags with MUC-related namespaces from private messages (fixes #1427)
Prevents duplication since it adds another <{muc#user}x> here
-rw-r--r--plugins/muc/muc.lib.lua1
1 files changed, 1 insertions, 0 deletions
diff --git a/plugins/muc/muc.lib.lua b/plugins/muc/muc.lib.lua
index a942182d..cf9b46f7 100644
--- a/plugins/muc/muc.lib.lua
+++ b/plugins/muc/muc.lib.lua
@@ -779,6 +779,7 @@ function room_mt:handle_message_to_occupant(origin, stanza)
return true;
end
log("debug", "%s sent private message stanza to %s (%s)", from, to, o_data.jid);
+ stanza = muc_util.filter_muc_x(st.clone(stanza));
stanza:tag("x", { xmlns = "http://jabber.org/protocol/muc#user" }):up();
stanza.attr.from = current_nick;
self:route_to_occupant(o_data, stanza)