From: Vsevolod Stakhov Date: Mon, 30 Apr 2018 18:45:02 +0000 (+0100) Subject: [Minor] Fix virtual symbols registration as parent now supports just ids X-Git-Tag: 1.7.4~5 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=25b40f2e49861c8cb56fd00dbedc6f97b716b0a8;p=rspamd.git [Minor] Fix virtual symbols registration as parent now supports just ids --- diff --git a/src/plugins/lua/antivirus.lua b/src/plugins/lua/antivirus.lua index ff64618cb..4fb683c41 100644 --- a/src/plugins/lua/antivirus.lua +++ b/src/plugins/lua/antivirus.lua @@ -846,7 +846,7 @@ if opts and type(opts) == 'table' then if not cb then rspamd_logger.errx(rspamd_config, 'cannot add rule: "' .. k .. '"') else - rspamd_config:register_symbol({ + local id = rspamd_config:register_symbol({ type = 'normal', name = m['symbol'], callback = cb, @@ -854,7 +854,7 @@ if opts and type(opts) == 'table' then rspamd_config:register_symbol({ type = 'virtual', name = m['symbol_fail'], - parent = m['symbol'], + parent = id, score = 0.0, }) has_valid = true @@ -876,7 +876,7 @@ if opts and type(opts) == 'table' then rspamd_config:register_symbol({ type = 'virtual', name = sym, - parent = m['symbol'] + parent = id }) end end