2
0
forked from Wavyzz/dolibarr

Fix #yogosha19838

This commit is contained in:
Laurent Destailleur
2024-01-09 21:37:53 +01:00
parent f45f5c3291
commit 203245bf95
5 changed files with 28 additions and 17 deletions

View File

@@ -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));