aboutsummaryrefslogtreecommitdiffstats
path: root/rules
diff options
context:
space:
mode:
authormoisseev <moiseev@mezonplus.ru>2020-06-04 18:54:41 +0300
committermoisseev <moiseev@mezonplus.ru>2020-06-04 18:54:41 +0300
commit25870a7895e658cc951880dffbb622d39bae9666 (patch)
tree342eec79f7f7894bdefc633a1769a99f6f6bb4d1 /rules
parent20a8767997253ec0259778ebc0838b74cf4d1dcb (diff)
downloadrspamd-25870a7895e658cc951880dffbb622d39bae9666.tar.gz
rspamd-25870a7895e658cc951880dffbb622d39bae9666.zip
[Minor] Fix missing selector check
Diffstat (limited to 'rules')
-rw-r--r--rules/controller/selectors.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/rules/controller/selectors.lua b/rules/controller/selectors.lua
index 905757c76..bde0cefb0 100644
--- a/rules/controller/selectors.lua
+++ b/rules/controller/selectors.lua
@@ -27,7 +27,7 @@ local function handle_list_extractors(_, conn)
end
local function handle_check_selector(_, conn, req_params)
- if req_params.selector then
+ if req_params.selector and req_params.selector ~= '' then
local selector = lua_selectors.create_selector_closure(rspamd_config,
req_params.selector, '', true)
conn:send_ucl({success = selector and true})
@@ -37,7 +37,7 @@ local function handle_check_selector(_, conn, req_params)
end
local function handle_check_message(task, conn, req_params)
- if req_params.selector then
+ if req_params.selector and req_params.selector ~= '' then
local selector = lua_selectors.create_selector_closure(rspamd_config,
req_params.selector, '', true)
if not selector then