From f879e676a216443d648edffc6d37322001a8994d Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Wed, 22 Sep 2021 11:10:59 +0100 Subject: [PATCH] [Fix] Another try to fix rspamd_text passing in the selectors Suggested by: @citrin --- lualib/lua_selectors/init.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lualib/lua_selectors/init.lua b/lualib/lua_selectors/init.lua index 726f7d394..eabf14b27 100644 --- a/lualib/lua_selectors/init.lua +++ b/lualib/lua_selectors/init.lua @@ -57,7 +57,7 @@ local function implicit_tostring(t, ud_or_table) end return logger.slog("%s", ud_or_table),'string' - elseif t == 'userdata' then + elseif (t == 'string' or t == 'text') and type(ud_or_table) == 'userdata' then if ud_or_table.cookie and ud_or_table.cookie == text_cookie then -- Preserve opaque return ud_or_table,'string' @@ -73,7 +73,7 @@ end local function process_selector(task, sel) local function allowed_type(t) - if t == 'string' or t == 'text' or t == 'string_list' or t == 'text_list' then + if t == 'string' or t == 'string_list' then return true end -- 2.39.5