From 25870a7895e658cc951880dffbb622d39bae9666 Mon Sep 17 00:00:00 2001 From: moisseev Date: Thu, 4 Jun 2020 18:54:41 +0300 Subject: [Minor] Fix missing selector check --- rules/controller/selectors.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'rules') 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 -- cgit v1.2.3