Actions
Bug #31278
closedMissing quoting in t3lib_extFileFunc
Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2011-10-25
Due date:
% Done:
100%
Estimated time:
TYPO3 Version:
4.6
PHP Version:
Tags:
scheduled
Complexity:
Is Regression:
Sprint Focus:
Description
During a FAL code sprint, we discovered that t3lib_extFileFunc does not escape file names when using them for exec calls. This could possibly lead to unwanted side-effects.
See e.g. this snippet from func_copy()
:
if ($this->PHPFileFunctions) {
copy($theFile, $theDestFile);
} else {
$cmd = 'cp "' . $theFile . '" "' . $theDestFile . '"';
t3lib_utility_Command::exec($cmd);
}
$theFile
and $theDestFile
are not escaped anywhere; from what I read in t3lib_utility_Command::imageMagickCommand()
, I guess we would have to use escapeshellarg()
here.
Files
Actions