Issue Bug Closed

#51781IMAGE content object accepts directories

Alexander Stehlik 09/05/13, 16:54 updated 10/23/17, 21:47

Description

When the path of an image content element is the path to a dirctory and not to a real file it should not be rendered.

I think I found the problem in commit:6aad338a in \TYPO3\CMS\Core\TypoScript\TemplateService->getFileName().

See also:
https://git.typo3.org/Packages/TYPO3.CMS.git/blobdiff/d0c8f2903eb639bc24154cfd716ff4760cb5a9aa..6aad338a:/t3lib/class.t3lib_tstemplate.php

parse_url() accepts the path to a directory (e.g. uploads/myextension/) so it will return the path unchanged, even if the file does not exist or is a directory. In the old version of the function it only returned a value if the provided file was a real file.

Reviews 2