]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Add nan protection for ipscore
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 13 Feb 2017 14:29:52 +0000 (14:29 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 13 Feb 2017 14:30:09 +0000 (14:30 +0000)
src/plugins/lua/ip_score.lua

index fed38033e01ec0c13f417177285c9b6751ac9c0b..04f1fb06e8b8cf5dd9c22e45b493857ad620d793 100644 (file)
@@ -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