]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Add sanity check
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 16 Aug 2019 11:13:14 +0000 (12:13 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 16 Aug 2019 11:13:14 +0000 (12:13 +0100)
lualib/lua_cfg_transform.lua

index ac328f86f048c7b8b6832d478dfb5b60c862123f..af9ae6cc2da3f1ce56392041446ab22348cdf673 100644 (file)
@@ -369,6 +369,8 @@ return function(cfg)
       }
     end
 
+    if not cfg.reputation.rules then cfg.reputation.rules = {} end
+
     if not fun.any(function(_, v) return v.selector and v.selector.ip end,
         cfg.reputation.rules) then
       logger.infox(rspamd_config, 'attach ip reputation element to use it')