Project

General

Profile

Actions

Bug #103813

closed

Infinite loop in EXT:lowlevel ConfigurationController

Added by Stefan Froemken 2 months ago. Updated 14 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 #1

Updated by Stefan Bürk 2 months ago

  • Related to Task #99899: Client-side System -> Configuration added
Actions #2

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.

Actions #3

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

Actions #4

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

Actions #5

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

Actions #6

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

Actions #7

Updated by Stefan Bürk 2 months ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #8

Updated by Benni Mack 14 days ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF