[TYPO3-core] RFC #12341: Bug: Image Generation broken with PHP safe_mode = On / Graphicsmagick

Benjamin Mack benni at typo3.org
Sun Jan 3 14:20:13 CET 2010


Hey Bernhard,

> The problem is not the naming of the output file, but rather of the
> input file:
>
> $this->imageMagickExec($imagefile.$frame, $output, $command);
>
> The $frame variable gets appended to the input file. The reason is for
> handling gif files with multiple frames. In the case of an appended [0]
> it only converts the first frame of the gif file.
Thanks for enlighten me.

So, basically the root of the cause is escapeshellargs() within 
t3lib_stdGraphics::wrapFileName()

=======
	protected function wrapFileName($inputName) {
		return escapeshellarg($inputName);
	}
=======

My one other solution would be to modify "wrapFileName" and to reg-exp 
this value to allow "[0-9]" at the end of the $inputName :)

Still, I don't think the other solution is that bad, I'll review it again.

All the best,
Benni.


More information about the TYPO3-team-core mailing list