From 7398bee580883ce652fa3de579daa483caac5bfa Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Fri, 21 May 2010 19:19:29 +0100 Subject: 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. --- plugins/mod_privacy.lua | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) 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 -- cgit v1.2.3