]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
Check variable before getting it.
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 24 Jul 2015 15:59:39 +0000 (16:59 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 24 Jul 2015 15:59:39 +0000 (16:59 +0100)
src/plugins/lua/ip_score.lua

index a4759aecfc9b00f22b9ed4782641c9d75976a2df..d0129c36ad2a4d38f0bc898b111eb0c00cea4f5c 100644 (file)
@@ -155,6 +155,11 @@ local ip_score_set = function(task)
   
   local pool = task:get_mempool()
   local asn, country, ipnet = ip_score_get_task_vars(task)
+  
+  if not pool:has_variable('ip_score') then
+    return
+  end
+  
   local asn_score,total_asn,
         country_score,total_country,
         ipnet_score,total_ipnet,