aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2018-04-30 19:45:02 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2018-04-30 19:45:02 +0100
commit25b40f2e49861c8cb56fd00dbedc6f97b716b0a8 (patch)
tree6c3bc3ddde94496ead7401a27b6010c55b77063a /src/plugins
parentf7c2caf78350a26b33c7919a45e87e5e448bdf93 (diff)
downloadrspamd-25b40f2e49861c8cb56fd00dbedc6f97b716b0a8.tar.gz
rspamd-25b40f2e49861c8cb56fd00dbedc6f97b716b0a8.zip
[Minor] Fix virtual symbols registration as parent now supports just ids
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/lua/antivirus.lua6
1 files changed, 3 insertions, 3 deletions
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