aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2021-04-09 19:27:29 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2021-04-09 19:27:29 +0100
commitdd51e047a9ce33c730e0d810d10c02b4d54b9e06 (patch)
tree3dfdb2aafe1bdf3cbb30611b8d257a392ce797a3
parent39c120b0375e4ed07f91df717c1cd72935e5fc2f (diff)
downloadrspamd-dd51e047a9ce33c730e0d810d10c02b4d54b9e06.tar.gz
rspamd-dd51e047a9ce33c730e0d810d10c02b4d54b9e06.zip
[Minor] Avoid extra has_symbol call
-rw-r--r--src/plugins/lua/phishing.lua5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/plugins/lua/phishing.lua b/src/plugins/lua/phishing.lua
index ed6ffe3bd..86b1d440b 100644
--- a/src/plugins/lua/phishing.lua
+++ b/src/plugins/lua/phishing.lua
@@ -183,8 +183,9 @@ local function phishing_cb(task)
-- Process all urls
local dmarc_dom
- if task:has_symbol('DMARC_POLICY_ALLOW') then
- local dsym = task:get_symbol('DMARC_POLICY_ALLOW')[1]
+ local dsym = task:get_symbol('DMARC_POLICY_ALLOW')
+ if dsym then
+ dsym = dsym[1] -- legacy stuff, need to take the first element
dmarc_dom = dsym.options[1]
end