})
end
- if common.need_check(task, content, rule, digest, clamav_check_uncached) then
+ if common.condition_check_and_continue(task, content, rule, digest, clamav_check_uncached) then
return
else
clamav_check_uncached()
end
end
- local f_message_not_too_large = message_not_too_large(task, content, rule) or true
- local f_message_not_too_small = message_not_too_small(task, content, rule) or true
- local f_message_min_words = message_min_words(task, rule) or true
- local f_dynamic_scan = dynamic_scan(task, rule) or true
+ local f_message_not_too_large = message_not_too_large(task, content, rule)
+ local f_message_not_too_small = message_not_too_small(task, content, rule)
+ local f_message_min_words = message_min_words(task, rule)
+ local f_dynamic_scan = dynamic_scan(task, rule)
if uncached and
f_message_not_too_large and
end
- if rule.redis_params then
+ if rule.redis_params and not rule.no_cache then
key = rule.prefix .. key
exports.log_clean = log_clean
exports.yield_result = yield_result
exports.match_patterns = match_patterns
-exports.need_check = need_check
+exports.condition_check_and_continue = need_check
exports.save_cache = save_cache
exports.create_regex_table = create_regex_table
exports.check_parts_match = check_parts_match
})
end
- if common.need_check(task, content, rule, digest, dcc_check_uncached) then
+ if common.condition_check_and_continue(task, content, rule, digest, dcc_check_uncached) then
return
else
dcc_check_uncached()
})
end
- if common.need_check(task, content, rule, digest, fprot_check_uncached) then
+ if common.condition_check_and_continue(task, content, rule, digest, fprot_check_uncached) then
return
else
fprot_check_uncached()
})
end
- if common.need_check(task, content, rule, digest, icap_check_uncached) then
+ if common.condition_check_and_continue(task, content, rule, digest, icap_check_uncached) then
return
else
icap_check_uncached()
})
end
- if common.need_check(task, content, rule, digest, kaspersky_check_uncached) then
+ if common.condition_check_and_continue(task, content, rule, digest, kaspersky_check_uncached) then
return
else
kaspersky_check_uncached()
http.request(request_data)
end
- if common.need_check(task, content, rule, digest, kaspersky_se_check_uncached) then
+ if common.condition_check_and_continue(task, content, rule, digest,
+ kaspersky_se_check_uncached) then
return
else
+
kaspersky_se_check_uncached()
end
end
- if common.need_check(task, content, rule, digest, oletools_check_uncached) then
+ if common.condition_check_and_continue(task, content, rule, digest, oletools_check_uncached) then
return
else
oletools_check_uncached()
})
end
- if common.need_check(task, content, rule, digest, savapi_check_uncached) then
+ if common.condition_check_and_continue(task, content, rule, digest, savapi_check_uncached) then
return
else
savapi_check_uncached()
})
end
- if common.need_check(task, content, rule, digest, sophos_check_uncached) then
+ if common.condition_check_and_continue(task, content, rule, digest, sophos_check_uncached) then
return
else
sophos_check_uncached()
})
end
- if common.need_check(task, content, rule, digest, spamassassin_check_uncached) then
+ if common.condition_check_and_continue(task, content, rule, digest, spamassassin_check_uncached) then
return
else
spamassassin_check_uncached()
http.request(request_data)
end
- if common.need_check(task, content, rule, digest, vade_check_uncached) then
+ if common.condition_check_and_continue(task, content, rule, digest, vade_check_uncached) then
return
else
vade_check_uncached()
-- if any mime_part filter defined, do not scan all attachments
if opts.mime_parts_filter_regex ~= nil
- or opts.mime_parts_filter_ext ~= nil then
- rule.scan_all_mime_parts = false
+ or opts.mime_parts_filter_ext ~= nil then
+ rule.scan_all_mime_parts = false
+ else
+ rule.scan_all_mime_parts = true
end
rule.patterns = common.create_regex_table(opts.patterns or {})