]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
[Fix] Setting check_local / check_authed in plugins (#1954)
authorAndrew Lewis <nerf@judo.za.org>
Mon, 11 Dec 2017 09:22:40 +0000 (11:22 +0200)
committerAndrew Lewis <nerf@judo.za.org>
Mon, 11 Dec 2017 09:22:40 +0000 (11:22 +0200)
src/plugins/lua/dmarc.lua
src/plugins/lua/hfilter.lua
src/plugins/lua/ip_score.lua
src/plugins/lua/once_received.lua

index b97881f9fa6bf5ba7209acac6c389a24cdc718eb..4a5a5be19334f2e50446b72832595f56f8fa98f2 100644 (file)
@@ -594,7 +594,7 @@ local function dmarc_callback(task)
 end
 
 local opts = rspamd_config:get_all_opt('options')
-if opts and type(opts) ~= 'table' then
+if type(opts) == 'table' then
   if type(opts['check_local']) == 'boolean' then
     check_local = opts['check_local']
   end
index 0b82357198c26e7a15bee4114bafc45079a2d06f..5223941843530616992bd1b882fd062946611973 100644 (file)
@@ -576,7 +576,7 @@ local symbols_from = {
 }
 
 local opts = rspamd_config:get_all_opt('options')
-if opts and type(opts) ~= 'table' then
+if type(opts) == 'table' then
   if type(opts['check_local']) == 'boolean' then
     check_local = opts['check_local']
   end
index bd64ba48ff42d2c913b77249d44a6c3c8098c3e0..0e9d8920e907b3178344707d78d95581722dd378 100644 (file)
@@ -350,7 +350,7 @@ end
 -- Configuration options
 local configure_ip_score_module = function()
   local opts = rspamd_config:get_all_opt('options')
-  if opts and type(opts) ~= 'table' then
+  if type(opts) == 'table' then
     if type(opts['check_authed']) == 'boolean' then
       check_authed = opts['check_authed']
     end
index d8fae5cf1f63260f80b12494a328a8f832e93fa1..75d551ec19b543e3b62e8c9fff661a549e930199 100644 (file)
@@ -141,7 +141,7 @@ local function check_quantity_received (task)
 end
 
 local opts = rspamd_config:get_all_opt('options')
-if opts and type(opts) ~= 'table' then
+if type(opts) == 'table' then
   if type(opts['check_local']) == 'boolean' then
     check_local = opts['check_local']
   end