]> source.dussan.org Git - rspamd.git/commitdiff
[Fix] Settings: avoid checking invalid IP (#1981) 1982/head
authorAndrew Lewis <nerf@judo.za.org>
Wed, 10 Jan 2018 16:54:57 +0000 (18:54 +0200)
committerAndrew Lewis <nerf@judo.za.org>
Wed, 10 Jan 2018 16:54:57 +0000 (18:54 +0200)
src/plugins/lua/settings.lua

index 93e9a56be5d3dca966e5712aa3cfad907519f978..7789d980c0f6fb49f0e21cb996d131c817f9d634 100644 (file)
@@ -174,7 +174,7 @@ local function check_settings(task)
     end
 
     if rule['ip'] then
-      if not ip then
+      if not ip or not ip:is_valid() then
         return nil
       end
       for _, i in ipairs(rule['ip']) do