]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Phishing: Small safety check
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 12 Apr 2021 15:55:26 +0000 (16:55 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 12 Apr 2021 15:55:26 +0000 (16:55 +0100)
src/plugins/lua/phishing.lua

index 86b1d440b5c20e1ea1d3991641b5442f6e7be545..e7c9a98a777ba099589cad6d844a788b684f074a 100644 (file)
@@ -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 {}