]> 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>
Wed, 24 Jan 2018 09:54:58 +0000 (11:54 +0200)
src/plugins/lua/dmarc.lua
src/plugins/lua/hfilter.lua
src/plugins/lua/ip_score.lua
src/plugins/lua/once_received.lua

index 67a5343e2c96e48a411c059731aeac33b1a5d205..443673751d407877650ae4260b1a805afba2decf 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 ca77dddc45a89d254cac8ca965805079b1b38689..e745981b5c097d56879f689cb8611e5e540f3499 100644 (file)
@@ -577,7 +577,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 879aff74c1d44a7ff3174680f3e2781003f9a0fa..0f4a32b655a550b5c0a6d3585bce2113589a57f4 100644 (file)
@@ -341,7 +341,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 e6dd444364453ac1fb353c4c6f4cb8f2f3b791df..328be0d202afb3617c3645cf83c2cc592678a26a 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