From: Matthew Wild Date: Fri, 21 May 2010 18:19:29 +0000 (+0100) Subject: mod_privacy: Remove validation that checks a roster group you block actually exists... X-Git-Url: https://git.enpas.org/?a=commitdiff_plain;h=6ebe4151c26ed2754db314f254d070e7e68f1051;p=prosody.git mod_privacy: Remove validation that checks a roster group you block actually exists - it would be time-consuming on large rosters, and isn't important (or correct?) anyway. --- diff --git a/plugins/mod_privacy.lua b/plugins/mod_privacy.lua index 77b4dd12..5a25f9a5 100644 --- a/plugins/mod_privacy.lua +++ b/plugins/mod_privacy.lua @@ -160,26 +160,7 @@ function createOrReplaceList (privacy_lists, origin, stanza, name, entries, rost end end - if tmp.type == "group" then - local found = false; - local roster = load_roster(origin.username, origin.host); - for jid,item in pairs(roster) do - if item.groups ~= nil then - for group in pairs(item.groups) do - if group == tmp.value then - found = true; - break; - end - end - if found == true then - break; - end - end - end - if found == false then - return {"cancel", "item-not-found", "Specifed roster group not existing."}; - end - elseif tmp.type == "subscription" then + if tmp.type == "subscription" then if tmp.value ~= "both" and tmp.value ~= "to" and tmp.value ~= "from" and