commit 833a1a4: [Minor] One more fix for empty symbols or groups in settings

Vsevolod Stakhov vsevolod at highsecure.ru
Fri May 29 14:49:08 UTC 2020


Author: Vsevolod Stakhov
Date: 2020-05-29 15:42:16 +0100
URL: https://github.com/rspamd/rspamd/commit/833a1a423099c41524709b10197c1e988ccdbdc4

[Minor] One more fix for empty symbols or groups in settings

---
 lualib/lua_settings.lua | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lualib/lua_settings.lua b/lualib/lua_settings.lua
index c8a0baf4d..b08b8c14e 100644
--- a/lualib/lua_settings.lua
+++ b/lualib/lua_settings.lua
@@ -64,6 +64,7 @@ local function register_settings_cb()
         end
       end
       if s.groups_enabled then
+        seen_enabled = true
         for _,gr in ipairs(s.groups_enabled) do
           local syms = rspamd_config:get_group_symbols(gr)
 
@@ -71,7 +72,6 @@ local function register_settings_cb()
             for _,sym in ipairs(syms) do
               enabled_symbols[sym] = true
               set.symbols[sym] = true
-              seen_enabled = true
             end
           end
         end
@@ -86,13 +86,13 @@ local function register_settings_cb()
         end
       end
       if s.groups_disabled then
+        seen_disabled = true
         for _,gr in ipairs(s.groups_disabled) do
           local syms = rspamd_config:get_group_symbols(gr)
 
           if syms then
             for _,sym in ipairs(syms) do
               disabled_symbols[sym] = true
-              seen_disabled = true
               set.symbols[sym] = false
             end
           end


More information about the Commits mailing list