mod_privacy: Remove validation that checks a roster group you block actually exists...
authorMatthew Wild <mwild1@gmail.com>
Fri, 21 May 2010 18:19:29 +0000 (19:19 +0100)
committerMatthew Wild <mwild1@gmail.com>
Fri, 21 May 2010 18:19:29 +0000 (19:19 +0100)
plugins/mod_privacy.lua

index 77b4dd129a21fa894e91b0ba18732abfd68771e7..5a25f9a5ca6f6e332e92f98f1cfb9aecfd4192a8 100644 (file)
@@ -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