commit bd5e529: [Minor] Neural: Another references fix

Vsevolod Stakhov vsevolod at highsecure.ru
Tue Jul 9 11:35:04 UTC 2019


Author: Vsevolod Stakhov
Date: 2019-07-09 12:26:41 +0100
URL: https://github.com/rspamd/rspamd/commit/bd5e5291ebda01d36236f93fd37d93efc9f83e98

[Minor] Neural: Another references fix

---
 src/plugins/lua/neural.lua | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/plugins/lua/neural.lua b/src/plugins/lua/neural.lua
index 9ed26dafb..9894ce4df 100644
--- a/src/plugins/lua/neural.lua
+++ b/src/plugins/lua/neural.lua
@@ -1152,7 +1152,7 @@ local function process_rules_settings()
       process_settings_elt(rule, nelt)
       for id,ex in pairs(rule.settings) do
         if type(ex) == 'table' then
-          if lua_util.distance_sorted(ex.symbols, nelt.symbols) == 0 then
+          if nelt and lua_util.distance_sorted(ex.symbols, nelt.symbols) == 0 then
             -- Equal symbols, add reference
             lua_util.debugm(N, rspamd_config,
                 'added reference from settings id %s to %s; same symbols',


More information about the Commits mailing list