]> source.dussan.org Git - rspamd.git/commitdiff
Add sanity guards for ip_score
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 23 Feb 2016 11:36:47 +0000 (11:36 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 23 Feb 2016 11:36:47 +0000 (11:36 +0000)
Issue: #536
Reported by: @AlexeySa

src/plugins/lua/ip_score.lua

index ab89cca910dd0e0f2ad4ba2aef32ddb7f0180b24..c18e11e0a4230ed4a042e470b225fdc03ddac55f 100644 (file)
@@ -146,7 +146,7 @@ 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
+  if not pool:has_variable('ip_score') or not asn or not country or not ipnet then
     return
   end