Project

General

Profile

Actions

Bug #51871

closed

Empty userTSConfig settings overrule pageTSConfig

Added by Max Beer over 10 years ago. Updated over 5 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 #1

Updated by Ernesto Baschny over 10 years ago

  • Category set to Backend API
  • Is Regression changed from No to Yes

Thanks for reporting Max. We'll take a look at it!

Actions #2

Updated by Gerrit Code Review over 10 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/23701

Actions #3

Updated by Gerrit Code Review over 10 years ago

Patch set 1 for branch TYPO3_6-1 has been pushed to the review server.
It is available at https://review.typo3.org/23702

Actions #4

Updated by Gerrit Code Review over 10 years ago

Patch set 1 for branch TYPO3_6-0 has been pushed to the review server.
It is available at https://review.typo3.org/23703

Actions #5

Updated by Helmut Hummel over 10 years ago

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

Updated by Benni Mack over 5 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF