Issue Bug Closed

#54750Wrong use of tempnam() in LocalPrieviewHelper

Frans Saris 01/05/14, 17:17 updated 10/23/17, 21:46

Description

In TYPO3\CMS\Core\Resource\Processing\LocalPrieviewHelper Utility\GeneralUtility::tempnam() is used to create a temp file.

$temporaryFileName = Utility\GeneralUtility::tempnam('preview_') . '.' . $task->getTargetFileExtension();

The problem here is that tempnam() creates a file int typo3temp but that one isn’t used because the file extension is added to the $temporyFileName.

This results in a empty file in typo3temp every time an processed file is created.

Reviews 1