Hi,
Clam AV handle compressed file that exceeds default compression ratio as virus (see question 36 in http://www.clamav.net/faq.html)
If you run clamscan from command line, you can disable this behavior using option --max-ratio=0
So, can be useful passing options when clam is invoked by Moodle too.
Following patch in lib/uploadlib.php allow to pass option to clam.
Just replace:
if (!$CFG->pathtoclam // !file_exists($CFG-pathtoclam) // !is_executable($CFG->pathtoclam)) {
whith:
$optpos = strpos($CFG->pathtoclam, -);
if ($optpos === false)
{ $clampath = trim($CFG->pathtoclam); }else
{ $clampath = trim(substr($CFG->pathtoclam, 0, $optpos)); }if (!$clampath // !file_exists($clampath) // !is_executable($clampath)) {