aboutsummaryrefslogtreecommitdiffstats
path: root/lualib/lua_selectors
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2020-04-30 13:21:08 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2020-04-30 13:21:08 +0100
commit1616d15b5565b7cc61bb541823684f93fe2a19c5 (patch)
treee934eefb86a1a8398ce11569b73315142c5f8f65 /lualib/lua_selectors
parent9ce6af13789d36a43b4f3170969902d7f2c4f2cc (diff)
downloadrspamd-1616d15b5565b7cc61bb541823684f93fe2a19c5.tar.gz
rspamd-1616d15b5565b7cc61bb541823684f93fe2a19c5.zip
[Minor] More fixes to digests selectors + added tests
Diffstat (limited to 'lualib/lua_selectors')
-rw-r--r--lualib/lua_selectors/extractors.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/lualib/lua_selectors/extractors.lua b/lualib/lua_selectors/extractors.lua
index e800e98e9..532c56592 100644
--- a/lualib/lua_selectors/extractors.lua
+++ b/lualib/lua_selectors/extractors.lua
@@ -136,8 +136,8 @@ uses any type by default)]],
local digests = {}
for _,p in ipairs(parts) do
if p:get_filename() then
- if not args[2] or args[2] == 'blake2' then
- -- Optimise as we already have this hash
+ if #args == 0 then
+ -- Optimise as we already have this hash in the API
table.insert(digests, p:get_digest())
else
table.insert(digests, common.create_digest(p:get_content('raw_parsed'), args))