2
0
forked from Wavyzz/dolibarr

Scrutinizer Auto-Fixes

This commit consists of patches automatically generated for this project on https://scrutinizer-ci.com
This commit is contained in:
Scrutinizer Auto-Fixer
2020-10-07 13:01:28 +00:00
parent 96ab66ea5a
commit 1512521d91
81 changed files with 14463 additions and 14463 deletions

View File

@@ -1533,7 +1533,7 @@ function dol_add_file_process($upload_dir, $allowoverwrite = 0, $donotupdatesess
$nbok = 0;
for ($i = 0; $i < $nbfile; $i++)
{
if (empty($TFile['name'][$i])) continue; // For example, when submitting a form with no file name
if (empty($TFile['name'][$i])) continue; // For example, when submitting a form with no file name
// Define $destfull (path to file including filename) and $destfile (only filename)
$destfull = $upload_dir."/".$TFile['name'][$i];
@@ -2053,7 +2053,7 @@ function dol_uncompress($inputfile, $outputdir)
for ($i = 0; $i < $zip->numFiles; $i++) {
if (preg_match('/\.\./', $zip->getNameIndex($i))) {
dol_syslog("Warning: Try to unzip a file with a transversal path ".$zip->getNameIndex($i), LOG_WARNING);
continue; // Discard the file
continue; // Discard the file
}
$zip->extractTo($outputdir.'/', array($zip->getNameIndex($i)));
}