forked from Wavyzz/dolibarr
Fix #yogosha19838
This commit is contained in:
@@ -870,7 +870,7 @@ class Documents extends DolibarrApi
|
||||
// Security:
|
||||
// If we need to make a virus scan
|
||||
if (empty($disablevirusscan) && file_exists($src_file)) {
|
||||
$checkvirusarray = dolCheckVirus($src_file);
|
||||
$checkvirusarray = dolCheckVirus($src_file, $dest_file);
|
||||
if (count($checkvirusarray)) {
|
||||
dol_syslog('Files.lib::dol_move_uploaded_file File "'.$src_file.'" (target name "'.$dest_file.'") KO with antivirus: errors='.join(',', $checkvirusarray), LOG_WARNING);
|
||||
throw new RestException(500, 'ErrorFileIsInfectedWithAVirus: '.join(',', $checkvirusarray));
|
||||
|
||||
Reference in New Issue
Block a user