From 5560527af809672a418746186b1d25b4babf68c1 Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Tue, 17 Nov 2015 17:01:25 +0000 Subject: muc.lib: Fix pattern so that it doesn't match hashes containing null bytes, causing dropped stanzas (thanks Jitsi folk!) --- plugins/muc/muc.lib.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/muc/muc.lib.lua b/plugins/muc/muc.lib.lua index 8028f5ae..d42fb2eb 100644 --- a/plugins/muc/muc.lib.lua +++ b/plugins/muc/muc.lib.lua @@ -361,7 +361,7 @@ local function construct_stanza_id(room, stanza) end local function deconstruct_stanza_id(room, stanza) local from_jid_possiblybare, to_nick = stanza.attr.from, stanza.attr.to; - local from_jid, id, to_jid_hash = (base64.decode(stanza.attr.id) or ""):match("^(.+)%z(.*)%z(.+)$"); + local from_jid, id, to_jid_hash = (base64.decode(stanza.attr.id) or ""):match("^(%Z+)%z(%Z*)%z(.+)$"); local from_nick = room._jid_nick[from_jid]; if not(from_nick) then return; end -- cgit v1.2.3