Bug #77645
closedClosures in SignalSlot\Dispatcher can cause troubles
100%
Description
Hi,
While connecting a quick SignalSlot to the Dispatcher using closure this can cause page rendering problems.
How to reproduce:
\TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Extbase\\SignalSlot\\Dispatcher')->connect( TYPO3\CMS\Core\Tree\TableConfiguration\TableConfiguration\DatabaseTreeDataProvider::class, \TYPO3\CMS\Core\Tree\TableConfiguration\DatabaseTreeDataProvider::SIGNAL_PostProcessTreeData, function(DatabaseTreeDataProvider $dataProvider, $treeData) { // my quick changes } );
Now add a Text with Image and an plugin which is an USER_INT.
The text with image load an FAL image in cObj, the USER_INT tries to serialize the cObj.
This results in the error: Serialization of 'Closure' is not allowed
I do not mind solving this issue myself, however I don't know on what level I should fix this.
1) Make sure cObj is serializable (using $this->cObj->setCurrentFile(null);
at the end of \TYPO3\CMS\CssStyledContent\Controller\CssStyledContentController::render_textpic()
)
2) Make sure Closures are not allowed in signal slots (using validation in connect())
Kind regards,
Benjamin
Updated by Gerrit Code Review almost 8 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 https://review.typo3.org/49615
Updated by Gerrit Code Review almost 8 years ago
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/49616
Updated by Gerrit Code Review almost 8 years ago
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/49615
Updated by Gerrit Code Review almost 8 years ago
Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/49615
Updated by Gerrit Code Review almost 8 years ago
Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/49615
Updated by Gerrit Code Review almost 8 years ago
Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/49615
Updated by Gerrit Code Review almost 8 years ago
Patch set 6 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/49615
Updated by Gerrit Code Review about 7 years ago
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/49616
Updated by Gerrit Code Review about 7 years ago
Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/49616
Updated by Gerrit Code Review about 7 years ago
Patch set 7 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/49615
Updated by Benjamin Serfhos about 7 years ago
- Related to Bug #64916: Avoid serialization of some members of ContentObjectRenderer added
Updated by Gerrit Code Review about 7 years ago
Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/49616
Updated by Gerrit Code Review about 7 years ago
Patch set 1 for branch TYPO3_8-7 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/52811
Updated by Gerrit Code Review about 7 years ago
Patch set 1 for branch TYPO3_7-6 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/52812
Updated by Benjamin Serfhos about 7 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset d52c0d6bb3dc817014bf3769bd2f58996f3356ee.
Updated by Daniel Goerz about 7 years ago
- Related to Bug #81866: Regression: css_styled_content does no longer render image captions added
Updated by Daniel Goerz about 7 years ago
With the description in this ticket I cannot reproduce this issue (without the patch applied, obviously). Can somebody add the steps one has to perform to reproduce?
I did the following (on 8LTS, since I dont have CSC in 9LTS):
- Revert the patch
- Installed css_styled_content
- Connect to the Signal with a closure
- Add text & image on a page
- Add a USER_INT on the same page
I do not get any error.
Updated by Benni Mack almost 6 years ago
- Status changed from Resolved to Closed