Issue Bug Closed

#24904Image generation broken with safe_mode on

Jan Radecker 01/31/11, 12:07 updated 10/24/17, 20:18

Description

Since TYPO3 4.5 – if safe_mode is on – the thumbnail generation is broken once again.

Image generation is affected by two issues formerly located at the files t3lib/class.t3lib_stdgraphic.php, t3lib/thumbs.php and t3lib/class.t3lib_div.php.
Now since TYPO3 4.5 some of the issues mentioned above are solved and some new are introduced (or moved to different file).

Related to http://forge.typo3.org/issues/24346 the use of escapeshellcmd() instead of escapeshellarg() solves an issue with safe_mode enabled PHP installations.
The faulty code now moved to file t3lib/utility/class.t3lib_utility_command.php, function imageMagickCommand().

Related to http://forge.typo3.org/issues/21609 escapeshellcmd/escapeshellarg has a problem with umlauts without having set a corresponding Locale .
Since while safe_mode is on exec() implicitly uses escapeshellcmd() the umlauts get lost if wrong or no locale is set.
Since TYPO3 4.5 a wrapper function for exec() was introduced in file t3lib/utility/class.t3lib_utility_command.php which does not set the locale at all.

The attached patch solves these two issues.
(issue imported from #M17419)

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.