From 33e2b639baa050d467f9f649c8bf12d8e06234a4 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Tue, 18 Feb 2014 20:03:12 +0100 Subject: mod_compression: Only allow compression on authenticated streams --- plugins/mod_compression.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'plugins') diff --git a/plugins/mod_compression.lua b/plugins/mod_compression.lua index 92856099..531ea8ea 100644 --- a/plugins/mod_compression.lua +++ b/plugins/mod_compression.lua @@ -126,7 +126,7 @@ end module:hook("stanza/http://jabber.org/protocol/compress:compressed", function(event) local session = event.origin; - if session.type == "s2sout_unauthed" or session.type == "s2sout" then + if session.type == "s2sout" then session.log("debug", "Activating compression...") -- create deflate and inflate streams local deflate_stream = get_deflate_stream(session); @@ -150,7 +150,7 @@ end); module:hook("stanza/http://jabber.org/protocol/compress:compress", function(event) local session, stanza = event.origin, event.stanza; - if session.type == "c2s" or session.type == "s2sin" or session.type == "c2s_unauthed" or session.type == "s2sin_unauthed" then + if session.type == "c2s" or session.type == "s2sin" then -- fail if we are already compressed if session.compressed then local error_st = st.stanza("failure", {xmlns=xmlns_compression_protocol}):tag("setup-failed"); -- cgit v1.2.3 From f701f760d138c413722ab0da17a4db391f08f87e Mon Sep 17 00:00:00 2001 From: Waqas Hussain Date: Tue, 1 Apr 2014 10:02:58 -0400 Subject: MUC: Fixed traceback when a JID not in a room requested a role change for an occupant. --- plugins/muc/muc.lib.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins') diff --git a/plugins/muc/muc.lib.lua b/plugins/muc/muc.lib.lua index 0dbe81fa..8028f5ae 100644 --- a/plugins/muc/muc.lib.lua +++ b/plugins/muc/muc.lib.lua @@ -1060,7 +1060,7 @@ function room_mt:can_set_role(actor_jid, occupant_jid, role) if actor_jid == true then return true; end local actor = self._occupants[self._jid_nick[actor_jid]]; - if actor.role == "moderator" then + if actor and actor.role == "moderator" then if occupant.affiliation ~= "owner" and occupant.affiliation ~= "admin" then if actor.affiliation == "owner" or actor.affiliation == "admin" then return true; -- cgit v1.2.3