# HG changeset patch # User Kim Alvefur # Date 1461776149 -7200 # Node ID 5a65750d959a3f4ff1ee10e4804d384e0a81458f # Parent 57ca4dcd91a79360fade41fa44bbbb169f8ea516 MUC: Be more careful with deserialization of rooms, fix case where a bare jid has joined as multiple participants diff -r 57ca4dcd91a7 -r 5a65750d959a plugins/muc/muc.lib.lua --- a/plugins/muc/muc.lib.lua Wed Apr 27 12:05:51 2016 +0200 +++ b/plugins/muc/muc.lib.lua Wed Apr 27 18:55:49 2016 +0200 @@ -1283,10 +1283,10 @@ for jid, data in pairs(frozen) do local node, host, resource = jid_split(jid); if node or host:sub(1,1) ~= "_" then - if not resource then + if not resource and type(data) == "string" then -- bare jid: affiliation room._affiliations[jid] = data; - elseif host == room_host and node == room_name then + elseif host == room_host and node == room_name and resource then -- full room jid: bare real jid and role local bare_jid = data.bare_jid; local occupant = occupant_lib.new(bare_jid, jid);