Bug #88879
closedContentObjectRenderer->imageLinkWrap could fail if ResourceFactory returns NULL instead of File
100%
Description
This line https://github.com/TYPO3/TYPO3.CMS/blob/master/typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php#L1319 could fail, if the ResourceFactory returned NULL earlier in execution at https://github.com/TYPO3/TYPO3.CMS/blob/master/typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php#L1290
It should probably be hardened, so this possibility of a NULL value is respected instead of the code breaking.
Updated by Frank Nägler over 5 years ago
- Status changed from New to Needs Feedback
Can you please post a stack trace or some more details.
The mentioned lines make no sense.
Updated by Kevin Ditscheid over 5 years ago
Give the imageLinkWrap function a file in a processed directory. typo3temp/assets/_processed_/somefile.jpg for example.
The ResourceFactory will return NULL and all the stuff will fall apart, because there is no File object created and the successfull creation of that object is never checked.
https://github.com/TYPO3/TYPO3.CMS/blob/master/typo3/sysext/core/Classes/Resource/ResourceFactory.php#L426
Updated by Kevin Ditscheid over 5 years ago
Also, if you give it a ProcessedFile object, it will complain about the identifier later in execution.
Updated by Gerrit Code Review over 4 years ago
- Status changed from Needs Feedback to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/63914
Updated by Gerrit Code Review over 4 years ago
Patch set 1 for branch 9.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/63904
Updated by Susanne Moog over 4 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 67f5e90ad627c6c473550197275f77fece6bf5e4.