]> source.dussan.org Git - rspamd.git/commitdiff
[Fix] Fix priorities in rspamd_update, disable rules execution
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Sun, 11 Mar 2018 15:43:00 +0000 (15:43 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Sun, 11 Mar 2018 15:43:00 +0000 (15:43 +0000)
src/plugins/lua/rspamd_update.lua

index 4eadc027a361c8e55feac14689f57403509f7164..51cb5db022a0c2400dfd3d0d12eed84dd121f041 100644 (file)
@@ -29,6 +29,8 @@ local lua_util = require "lua_util"
 local N = "rspamd_update"
 local rspamd_version = rspamd_version
 local maps = {}
+local allow_rules = false -- Deny for now
+local global_priority = 1 -- Default for local rules
 
 local function process_symbols(obj, priority)
   fun.each(function(sym, score)
@@ -102,12 +104,12 @@ local function gen_callback()
       if check_version(obj) then
 
         if obj['symbols'] then
-          process_symbols(obj['symbols'])
+          process_symbols(obj['symbols'], global_priority)
         end
         if obj['actions'] then
-          process_actions(obj['actions'])
+          process_actions(obj['actions'], global_priority)
         end
-        if obj['rules'] then
+        if allow_rules and obj['rules'] then
           process_rules(obj['rules'])
         end