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

index 54b6d65cd7ffc744722c887378ba5ec54582d275..ad5cbef66e18a4961f1f2f2bb115f6c1859bd1bf 100644 (file)
@@ -155,7 +155,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