Project

General

Profile

Actions

Bug #103813

closed

Infinite loop in EXT:lowlevel ConfigurationController

Added by Stefan Froemken 2 months ago. Updated 8 days ago.

Status:
Closed
Priority:
Should have
Assignee:
Category:
System/Bootstrap/Configuration
Target version:
Start date:
2024-05-10
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
12
PHP Version:
8.1
Tags:
Complexity:
Is Regression:
Sprint Focus:

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


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Task #99899: Client-side System -> ConfigurationClosed2023-02-09

Actions
Actions

Also available in: Atom PDF