Project

General

Profile

Actions

Bug #95840

open

TcaPreparation::prepareQuotingOfTableNamesAndColumnNames() skips types columnsOverrides

Added by Leonie Philine over 2 years ago. Updated 10 months ago.

Status:
New
Priority:
Should have
Assignee:
-
Category:
System/Bootstrap/Configuration
Target version:
-
Start date:
2021-11-01
Due date:
% Done:

0%

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

Description

\TYPO3\CMS\Core\Preparations\TcaPreparation::prepareQuotingOfTableNamesAndColumnNames() is buggy:

The method only traverses 'columns' of each table, to quote identifiers marked like {#identifier} in TCA SQL parts.

However, such TCA SQL parts - like foreign_table_where - might also occur in overridden columns of specified types, like: $GLOBALS['TCA'][<table>]['types'][<type>]['columnsOverrides'][<column>]['config'].

Therefore, to fix this bug, all types must be traversed as well, and identifiers quoted.

Otherwise, identifiers marked like {#identifier} in TCA SQL parts of columnsOverrides sections are not quoted, resulting in SQL syntax errors.

At least TYPO3 10, 11 and the development branch are affected. (https://github.com/TYPO3/typo3/blob/master/typo3/sysext/core/Classes/Preparations/TcaPreparation.php#L189)

Actions #1

Updated by Benni Mack 10 months ago

Side-note: Only happens in v11, not in v12 anymore.

Actions

Also available in: Atom PDF