commit 6c1217f: [Minor] Phishing: Small safety check

Vsevolod Stakhov vsevolod at highsecure.ru
Mon Apr 12 15:56:03 UTC 2021


Author: Vsevolod Stakhov
Date: 2021-04-12 16:55:26 +0100
URL: https://github.com/rspamd/rspamd/commit/6c1217f0eb3764cc9ba393d90ccfc5eafa23f2c5 (HEAD -> master)

[Minor] Phishing: Small safety check

---
 src/plugins/lua/phishing.lua | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/plugins/lua/phishing.lua b/src/plugins/lua/phishing.lua
index 86b1d440b..e7c9a98a7 100644
--- a/src/plugins/lua/phishing.lua
+++ b/src/plugins/lua/phishing.lua
@@ -186,7 +186,9 @@ local function phishing_cb(task)
   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]
+    if dsym.options then
+      dmarc_dom = dsym.options[1]
+    end
   end
 
   local urls = task:get_urls() or {}


More information about the Commits mailing list