summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAndrew Lewis <nerf@judo.za.org>2017-12-11 11:22:40 +0200
committerAndrew Lewis <nerf@judo.za.org>2018-01-24 11:54:58 +0200
commit1bb7736be1d789b9613e8aedc418e796f1f5155f (patch)
treec01bda1c0e0f7344be283d9d7947ceb36ffa8740 /src
parentab3817f4912751de1ca3d395ceca80dc03100929 (diff)
downloadrspamd-1bb7736be1d789b9613e8aedc418e796f1f5155f.tar.gz
rspamd-1bb7736be1d789b9613e8aedc418e796f1f5155f.zip
[Fix] Setting check_local / check_authed in plugins (#1954)
Diffstat (limited to 'src')
-rw-r--r--src/plugins/lua/dmarc.lua2
-rw-r--r--src/plugins/lua/hfilter.lua2
-rw-r--r--src/plugins/lua/ip_score.lua2
-rw-r--r--src/plugins/lua/once_received.lua2
4 files changed, 4 insertions, 4 deletions
diff --git a/src/plugins/lua/dmarc.lua b/src/plugins/lua/dmarc.lua
index 67a5343e2..443673751 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 ca77dddc4..e745981b5 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 879aff74c..0f4a32b65 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 e6dd44436..328be0d20 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