Project

General

Profile

Actions

Bug #51871

closed

Empty userTSConfig settings overrule pageTSConfig

Added by Max Beer about 11 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Backend API
Target version:
-
Start date:
2013-09-09
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
6.0
PHP Version:
Tags:
Complexity:
Is Regression:
Yes
Sprint Focus:

Description

Following commit (https://review.typo3.org/#/c/23032/ - Ticket: http://forge.typo3.org/issues/51007) leads to defective behaivor in \TYPO3\CMS\Core\Utility\GeneralUtility::array_merge_recursive_overrule().

If you access TYPO3\CMS\Backend\UtilityBackendUtility::getModTSconfig() with a tsconfig string which only exists in pageTSConfig and not in userTSConfig, pageTSConfig value will be overruled by undefined userTSConfig setting.

This is reasoned by the changed default return value in TYPO3\CMS\Core\Utility\GeneralUtility\BackendUserAuthentication->getTSConfig() for undefined TSConfig settings. If there is no userTSConfig defined for given setting it will return

array('value' => NULL, 'properties' => NULL);

Previously it returned an empty array.

Subsequently the function TYPO3\CMS\Core\Utility\GeneralUtility::array_merge_recursive_overrule() merges userTSconfig and pageTSconfig wrong because of given value/properties array for undefined tsconfig setting. Actual value of pageTSconfig will be overruled by NULL value of userTSconfig.

I am not sure how a proper fix would look like. Reverting the change of http://forge.typo3.org/issues/51007 and updating doctype comment? Call array_merge_recursive_overrule in getModTSconfig with includeEmptyValues = false?


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #51007: Fix inconsistencies in getTSConfig in BackenuserAuthClosedHelmut Hummel2013-08-10

Actions
Actions

Also available in: Atom PDF