Issue Task Under Review

#111715Restrict constant() and enum() in expressions to an allowlist

Benni Mack 12/03/26, 13:55 updated 12/03/26, 14:02

Description

Symfony ExpressionLanguage 8.2 deprecates its built-in functions constant() and enum(), which read any PHP constant or enum case, in favour of a ConstantFunctionProvider that restricts them to a list of allowed constants.

Both functions are available in TypoScript and TSconfig conditions, site conditions and form variants. TYPO3 should provide them via ConstantFunctionProvider, allowing PHP_* constants, LF/CR/CRLF and the class constants and enum cases of the TYPO3\CMS namespace by default, and let extensions and admins allow more via $GLOBALS[‘TYPO3_CONF_VARS’][‘SYS’][‘expressionLanguage’][‘allowedConstants’].

This is a breaking change for conditions reading other constants.

Reviews 1

Linked, but not in Forger: Change 98299

History 01

  1. Gerrit Code Review pushed patch set 1 for main to change 98299 status New Under Review 12/03/26, 14:02