Browse Source

[Fix] Fix ClamAV result for cached encrypted file (#3395)

tags/2.7
Andrew Lewis 3 years ago
parent
commit
c167e30788
1 changed files with 2 additions and 1 deletions
  1. 2
    1
      lualib/lua_scanners/clamav.lua

+ 2
- 1
lualib/lua_scanners/clamav.lua View File

@@ -139,10 +139,11 @@ local function clamav_check(task, content, digest, rule)
if string.find(vname, '^Heuristics%.Encrypted') then
rspamd_logger.errx(task, '%s: File is encrypted', rule.log_prefix)
common.yield_result(task, rule, 'File is encrypted: '.. vname, 0.0, 'encrypted')
cached = 'encrypted'
cached = 'ENCRYPTED'
elseif string.find(vname, '^Heuristics%.OLE2%.ContainsMacros') then
rspamd_logger.errx(task, '%s: ClamAV Found an OLE2 Office Macro', rule.log_prefix)
common.yield_result(task, rule, vname, 0.0, 'macro')
cached = 'MACRO'
elseif string.find(vname, '^Heuristics%.Limits%.Exceeded') then
rspamd_logger.errx(task, '%s: ClamAV Limits Exceeded', rule.log_prefix)
common.yield_result(task, rule, 'Limits Exceeded: '.. vname, 0.0, 'fail')

Loading…
Cancel
Save