From: Andrew Lewis Date: Mon, 11 Dec 2017 09:22:40 +0000 (+0200) Subject: [Fix] Setting check_local / check_authed in plugins (#1954) X-Git-Tag: 1.6.6~3^2~22 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1bb7736be1d789b9613e8aedc418e796f1f5155f;p=thirdparty%2Frspamd.git [Fix] Setting check_local / check_authed in plugins (#1954) --- diff --git a/src/plugins/lua/dmarc.lua b/src/plugins/lua/dmarc.lua index 67a5343e2c..443673751d 100644 --- a/src/plugins/lua/dmarc.lua +++ b/src/plugins/lua/dmarc.lua @@ -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 diff --git a/src/plugins/lua/hfilter.lua b/src/plugins/lua/hfilter.lua index ca77dddc45..e745981b5c 100644 --- a/src/plugins/lua/hfilter.lua +++ b/src/plugins/lua/hfilter.lua @@ -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 diff --git a/src/plugins/lua/ip_score.lua b/src/plugins/lua/ip_score.lua index 879aff74c1..0f4a32b655 100644 --- a/src/plugins/lua/ip_score.lua +++ b/src/plugins/lua/ip_score.lua @@ -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 diff --git a/src/plugins/lua/once_received.lua b/src/plugins/lua/once_received.lua index e6dd444364..328be0d202 100644 --- a/src/plugins/lua/once_received.lua +++ b/src/plugins/lua/once_received.lua @@ -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