From dd51e047a9ce33c730e0d810d10c02b4d54b9e06 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Fri, 9 Apr 2021 19:27:29 +0100 Subject: [Minor] Avoid extra has_symbol call --- src/plugins/lua/phishing.lua | 5 +++-- 1 file 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 -- cgit v1.2.3