aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/muc
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2015-11-17 17:01:25 +0000
committerMatthew Wild <mwild1@gmail.com>2015-11-17 17:01:25 +0000
commit9df7963eddd6cae3b0df9b26c85c6592c6966b76 (patch)
tree5e9220894c522749567afc6a07e1ac4c6c591027 /plugins/muc
parent66d1bb7b86d15413a76e554e537e1482dbb33ab9 (diff)
downloadprosody-9df7963eddd6cae3b0df9b26c85c6592c6966b76.tar.gz
prosody-9df7963eddd6cae3b0df9b26c85c6592c6966b76.zip
muc.lib: Fix pattern so that it doesn't match hashes containing null bytes, causing dropped stanzas (thanks Jitsi folk!)
Diffstat (limited to 'plugins/muc')
-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 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