aboutsummaryrefslogtreecommitdiffstats
path: root/lualib/lua_scanners/oletools.lua
diff options
context:
space:
mode:
authorCarsten Rosenberg <c.rosenberg@heinlein-support.de>2019-04-02 06:38:54 +0200
committerCarsten Rosenberg <c.rosenberg@heinlein-support.de>2019-04-02 06:38:54 +0200
commit2f118ada4e5ea26ab6d395346661f713668b099b (patch)
treebd638290b7a8c8a5361d9e0fdf64b6328774067f /lualib/lua_scanners/oletools.lua
parent633e5513e27b1ea14b6f152ef72a5498b6b1f825 (diff)
downloadrspamd-2f118ada4e5ea26ab6d395346661f713668b099b.tar.gz
rspamd-2f118ada4e5ea26ab6d395346661f713668b099b.zip
[Minor] fix some warnings
Diffstat (limited to 'lualib/lua_scanners/oletools.lua')
-rw-r--r--lualib/lua_scanners/oletools.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/lualib/lua_scanners/oletools.lua b/lualib/lua_scanners/oletools.lua
index a17840305..d16c1877f 100644
--- a/lualib/lua_scanners/oletools.lua
+++ b/lualib/lua_scanners/oletools.lua
@@ -130,10 +130,10 @@ local function oletools_check(task, content, digest, rule)
rspamd_logger.errx(task, '%s: Error message: %s',
rule.log_prefix, result[2]['message'])
oletools_requery(oletools_rc[result[3]['return_code']])
- elseif #result[2]['analysis'] == 0 and #result[2]['macros'] == 0 then
+ elseif type(result[2]['analysis']) == 'table' and #result[2]['analysis'] == 0 and #result[2]['macros'] == 0 then
rspamd_logger.warnx(task, '%s: maybe unhandled python or oletools error', rule.log_prefix)
common.yield_result(task, rule, 'oletools unhandled error', 0.0, 'fail')
- elseif result[2]['analysis'] == 'null' and #result[2]['macros'] == 0 then
+ elseif type(result[2]['analysis']) ~= 'table' and #result[2]['macros'] == 0 then
common.save_av_cache(task, digest, rule, 'OK')
common.log_clean(task, rule, 'No macro found')
elseif #result[2]['macros'] > 0 then