Bug #64239
closedCatchable fatal error in PageRepository::getFileReferences() if no reference exists
100%
Description
Due to a missing check on the type of $element in TYPO3\CMS\Frontend\ContentObject\FilesContentObject->handleFileReferences(), it is possible to crash page rendering.
By using a configuration like below
10 = FILES 10 { references { table = tx_someforeign_table uid.field = identifier_field fieldName = reference_field_name } renderObj = IMAGE renderObj.file { import.data = file:current:uid treatIdAsReference = 1 } }
And having a NULL / empty value in the identifier_field, a fatal error is triggered.
PHP Catchable fatal error: Argument 3 passed to TYPO3\\CMS\\Frontend\\Page\\PageRepository::getFileReferences() must be of the type array, null given, called in /var/www/typo3_src/TYPO3_6-2/typo3/sysext/frontend/Classes/ContentObject/FilesContentObject.php on line 317 and defined in /var/www/typo3_src/TYPO3_6-2/typo3/sysext/frontend/Classes/Page/PageRepository.php on line 1357
Since I'm no FAL expert, my best guess is to quit the function if $element isn't an array before calling getFileReferences - but I would like some feedback before starting on a patch
Updated by Frans Saris over 9 years ago
- Category set to File Abstraction Layer (FAL)
Add a early return to getFileReferences() if given value isn't a array
Updated by Mathias Schreiber over 9 years ago
- Target version changed from next-patchlevel to 7.1 (Cleanup)
- Sprint Focus set to On Location Sprint
Updated by Gerrit Code Review over 9 years ago
- Status changed from New 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 http://review.typo3.org/36480
Updated by Gerrit Code Review over 9 years ago
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/36480
Updated by Gerrit Code Review over 9 years ago
Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/36480
Updated by Gerrit Code Review over 9 years ago
Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/36480
Updated by Gerrit Code Review about 9 years ago
Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/36480
Updated by Francois Suter about 9 years ago
- Target version changed from 7.1 (Cleanup) to next-patchlevel
Updated by Francois Suter about 9 years ago
I changed the target version, because this one has to go into 6.2 too.
Updated by Gerrit Code Review about 9 years ago
Patch set 6 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/36480
Updated by Frank Nägler about 9 years ago
- Target version changed from next-patchlevel to 6.2.13
- Sprint Focus changed from On Location Sprint to Stabilization Sprint
Updated by Gerrit Code Review about 9 years ago
Patch set 1 for branch TYPO3_6-2 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/39905
Updated by Alina Fleser about 9 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset c52269d82343907010374882b5faefa677bc569c.
Updated by Riccardo De Contardi almost 7 years ago
- Status changed from Resolved to Closed