From: Vsevolod Stakhov Date: Mon, 13 Feb 2017 14:29:52 +0000 (+0000) Subject: [Minor] Add nan protection for ipscore X-Git-Tag: 1.5.0~116 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=a8220235826d158f216ee0dfce2fb3b6a0939a75;p=rspamd.git [Minor] Add nan protection for ipscore --- diff --git a/src/plugins/lua/ip_score.lua b/src/plugins/lua/ip_score.lua index fed38033e..04f1fb06e 100644 --- a/src/plugins/lua/ip_score.lua +++ b/src/plugins/lua/ip_score.lua @@ -229,6 +229,9 @@ local ip_score_check = function(task) local rep = tonumber(parts[1]) local total = tonumber(parts[2]) + if rep ~= rep then rep = 0 end + if total ~= total then total = 0 end + return rep, total end