Index: t3lib/class.t3lib_stdgraphic.php =================================================================== --- t3lib/class.t3lib_stdgraphic.php (Revision 6254) +++ t3lib/class.t3lib_stdgraphic.php (Arbeitskopie) @@ -2665,7 +2665,7 @@ $this->IM_commands[] = array($output,$cmd); $ret = exec($cmd); - t3lib_div::fixPermissions($this->wrapFileName($output)); // Change the permissions of the file + t3lib_div::fixPermissions($output); // Change the permissions of the file return $ret; } @@ -2696,7 +2696,7 @@ $this->IM_commands[] = Array ($output,$cmd); $ret = exec($cmd); - t3lib_div::fixPermissions($this->wrapFileName($output)); // Change the permissions of the file + t3lib_div::fixPermissions($output); // Change the permissions of the file if (is_file($theMask)) { @unlink($theMask); @@ -2707,17 +2707,14 @@ } /** - * Wrapping the input filename in double-quotes + * Escapes a file name so it can safely be used on the command line. * - * @param string Input filename - * @return string The output wrapped in "" (if there are spaces in the filepath) - * @access private + * @param string $inputName filename to safeguard, must not be empty + * + * @return string $inputName escaped as needed */ - function wrapFileName($inputName) { - if (strstr($inputName,' ')) { - $inputName='"'.$inputName.'"'; - } - return $inputName; + protected function wrapFileName($inputName) { + return escapeshellarg($inputName); }