Index: t3lib/class.t3lib_stdgraphic.php =================================================================== --- t3lib/class.t3lib_stdgraphic.php (revision 6275) +++ t3lib/class.t3lib_stdgraphic.php (working copy) @@ -2714,7 +2714,8 @@ * @return string $inputName escaped as needed */ protected function wrapFileName($inputName) { - return escapeshellarg($inputName); + // if safe_mode enabled, escapeshellcmd() is run on exec argument + return ini_get('safe_mode') ? '\'' . $inputName . '\'' : escapeshellarg($inputName); } Index: t3lib/thumbs.php =================================================================== --- t3lib/thumbs.php (revision 6275) +++ t3lib/thumbs.php (working copy) @@ -379,7 +379,8 @@ * @return string $inputName escaped as needed */ protected function wrapFileName($inputName) { - return escapeshellarg($inputName); + // if safe_mode enabled, escapeshellcmd() is run on exec argument + return ini_get('safe_mode') ? '\'' . $inputName . '\'' : escapeshellarg($inputName); } }