From: Vsevolod Stakhov Date: Sun, 11 Mar 2018 15:43:00 +0000 (+0000) Subject: [Fix] Fix priorities in rspamd_update, disable rules execution X-Git-Tag: 1.7.0~12 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=9501c2fe4f643f55a55a8d2c33b18203213b46f3;p=rspamd.git [Fix] Fix priorities in rspamd_update, disable rules execution --- diff --git a/src/plugins/lua/rspamd_update.lua b/src/plugins/lua/rspamd_update.lua index 4eadc027a..51cb5db02 100644 --- a/src/plugins/lua/rspamd_update.lua +++ b/src/plugins/lua/rspamd_update.lua @@ -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