Project

General

Profile

Bug #31278 ยป 31278.diff

Andreas Wolf, 2011-10-25 13:43

View differences:

t3lib/class.t3lib_extfilefunc.php
if ($this->PHPFileFunctions) {
copy($theFile, $theDestFile);
} else {
$cmd = 'cp "' . $theFile . '" "' . $theDestFile . '"';
$cmd = 'cp "' . escapeshellarg($theFile) . '" "' . escapeshellarg($theDestFile) . '"';
t3lib_utility_Command::exec($cmd);
}
t3lib_div::fixPermissions($theDestFile);
......
return FALSE;
}
// No way to do this under windows!
$cmd = 'cp -R "' . $theFile . '" "' . $theDestFile . '"';
$cmd = 'cp -R "' . escapeshellarg($theFile) . '" "' . escapeshellarg($theDestFile) . '"';
t3lib_utility_Command::exec($cmd);
clearstatcache();
if (@is_dir($theDestFile)) {
......
if ($this->PHPFileFunctions) {
@rename($theFile, $theDestFile);
} else {
$cmd = 'mv "' . $theFile . '" "' . $theDestFile . '"';
$cmd = 'mv "' . escapeshellarg($theFile) . '" "' . escapeshellarg($theDestFile) . '"';
t3lib_utility_Command::exec($cmd);
}
clearstatcache();
......
if ($this->PHPFileFunctions) {
@rename($theFile, $theDestFile);
} else {
$cmd = 'mv "' . $theFile . '" "' . $theDestFile . '"';
$cmd = 'mv "' . escapeshellarg($theFile) . '" "' . escapeshellarg($theDestFile) . '"';
$errArr = array();
t3lib_utility_Command::exec($cmd, $errArr);
}
......
}
if ($this->checkPathAgainstMounts($theFile) && $this->checkPathAgainstMounts($theDest . '/')) {
// No way to do this under windows.
$cmd = $this->unzipPath . 'unzip -qq "' . $theFile . '" -d "' . $theDest . '"';
$cmd = $this->unzipPath . 'unzip -qq "' . escapeshellarg($theFile) . '" -d "' . escapeshellarg($theDest) . '"';
t3lib_utility_Command::exec($cmd);
$this->writelog(7, 0, 1, 'Unzipping file "%s" in "%s"', array($theFile, $theDest));
return TRUE;
    (1-1/1)