chg: [internal] Do not scan attachment that are bigger than 25 MB

pull/9480/head
Jakub Onderka 2024-01-08 14:01:58 +01:00
parent 3365796c6c
commit e1b4d81f51
1 changed files with 4 additions and 5 deletions

View File

@ -351,11 +351,10 @@ class AttachmentScan extends AppModel
return false; // empty file is automatically considered as not infected
}
/* if ($file->size() > 50 * 1024 * 1024) {
$this->log("File '$file->path' is bigger than 50 MB, will be not scanned.", LOG_NOTICE);
return false;
}*/
if ($fileSize > 25 * 1024 * 1024) {
$this->log("File '$file->path' is bigger than 25 MB, will be not scanned.", LOG_NOTICE);
return false;
}
$fileContent = $file->read();
if ($fileContent === false) {