Bug #103813
closedInfinite loop in EXT:lowlevel ConfigurationController
100%
Description
Hello,
I get an infinite loop problem in Configuration Module of TYPO3 backend. Problem is an extension which registers a hook that way in ext_localconf.php:
<?php if (!defined('TYPO3')) { die('Access denied.'); } call_user_func(static function(): void { // call very first TYPO3 hook for redirecting requests $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/index_ts.php']['preprocessRequest'][] = function($parameters, $parent) { $login = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance( \EinsZuEins\Login1zu1\UserFunc\Login::class ); $login->main($parameters, $parent); }; });
Problem are these both lines:
https://github.com/TYPO3/typo3/blob/v12.4.14/typo3/sysext/lowlevel/Classes/Controller/ConfigurationController.php#L94-L95
It loops through the $tree array and $value becomes a PHP:Closure. Yes Closure is an object and is not traverseable. So, with these lines you make an array again which results into the infinite loop.
Nice greetings
Stefan
Updated by Stefan Bürk 2 months ago
- Related to Task #99899: Client-side System -> Configuration added
Updated by Stefan Bürk 2 months ago
- Status changed from New to Accepted
- Assignee set to Stefan Bürk
confirmed. It's enough to add following code
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']
['tslib/index_ts.php']['preprocessRequest'][]
= function($parameters, $parent) {};
to any extension ext_localconf.php
file to demonstrate
this issue.
Updated by Gerrit Code Review 2 months ago
- Status changed from Accepted to Under Review
Patch set 1 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/84187
Updated by Gerrit Code Review 2 months ago
Patch set 2 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/84187
Updated by Gerrit Code Review 2 months ago
Patch set 3 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/84187
Updated by Gerrit Code Review 2 months ago
Patch set 1 for branch 12.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/84196
Updated by Stefan Bürk 2 months ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 420044e055335cd5bd98e22958dbd9d552395288.