Project

General

Profile

Actions

Bug #100040

closed

Properly validate start module

Added by Dmitry Dulepov about 1 year ago. Updated about 1 year ago.

Status:
Closed
Priority:
Should have
Assignee:
Category:
Backend User Interface
Start date:
2023-02-27
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
11
PHP Version:
Tags:
Complexity:
easy
Is Regression:
Sprint Focus:

Description

BackendController::getStartupModule() checks for the 'startModule' incorrectly. The code is:

                } elseif ($this->moduleLoader->checkMod($beUser->uc['startModule'] ?? '') !== 'notFound') {
                    $startModule = $beUser->uc['startModule'];

Method checkMod can return string, bool or array. Only array means that that the module exists and available. String and bool (which can only be false) mean that the module should not be used. Therefore the check should be like:

                } elseif (is_array($this->moduleLoader->checkMod($beUser->uc['startModule'] ?? ''))) {
                    $startModule = $beUser->uc['startModule'];
Actions

Also available in: Atom PDF