aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2015-07-24 16:59:39 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2015-07-24 16:59:39 +0100
commitdef3ec562c8dd789efe2a1f3f31217275fa5ecd3 (patch)
tree207848f3126ee6932a33fca31dbfedcd254c0f2e /src/plugins
parent62c541c72d6efdc7c4fd0c2682fcb7d2d3714b12 (diff)
downloadrspamd-def3ec562c8dd789efe2a1f3f31217275fa5ecd3.tar.gz
rspamd-def3ec562c8dd789efe2a1f3f31217275fa5ecd3.zip
Check variable before getting it.
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/lua/ip_score.lua5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/plugins/lua/ip_score.lua b/src/plugins/lua/ip_score.lua
index a4759aecf..d0129c36a 100644
--- a/src/plugins/lua/ip_score.lua
+++ b/src/plugins/lua/ip_score.lua
@@ -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,