]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Avoid nil index 1194/head
authorAndrew Lewis <nerf@judo.za.org>
Mon, 28 Nov 2016 10:32:01 +0000 (12:32 +0200)
committerAndrew Lewis <nerf@judo.za.org>
Mon, 28 Nov 2016 10:32:01 +0000 (12:32 +0200)
rules/misc.lua

index 7fbd9cf1a995ff5cd3701ee18a8a27ab419e89a2..f7b63d3c81b400d40d146c376f148bc48426a32d 100644 (file)
@@ -498,7 +498,8 @@ local check_from_id = rspamd_config:register_callback_symbol('CHECK_FROM', 1.0,
     -- Check if FROM == TO
     if (#to == 1 and to[1].addr:lower() == from[1].addr:lower()) then
       task:insert_result('TO_EQ_FROM', 1.0)
-    elseif (#to == 1 and to[1].domain:lower() == from[1].domain:lower()) then
+    elseif (#to == 1 and to[1].domain and from[1].domain and
+        to[1].domain:lower() == from[1].domain:lower()) then
       task:insert_result('TO_DOM_EQ_FROM_DOM', 1.0)
     end
   end