Review main Abandoned

87417[BUGFIX] Use created object in FormProtectionFactory

Benni Mack CR 0 V 0 Easy +6 −4 updated 12/10/24, 17:22

Commit message

Instead of relying on a cache entry, TYPO3's
FormProtectionFactory returns the directly created
object, thus - making FormProtectionFactory
work with NullBackend of Caching Framework

Review

  • Code review CR 0
  • Verified V 0

Issues 2

Files 1

Review log 56

  1. Benni Mack uploaded patch set 1 12/10/24, 12:54

  2. core-ci voted on patch set 1 V +1 12/10/24, 12:59 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/70860

  3. Andreas Kienast voted on patch set 1 CR +1 12/10/24, 13:56

  4. Benjamin Franzke commented on patch set 1 V -1 12/10/24, 14:54

    Using ``` $GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['runtime']['backend'] = \TYPO3\CMS\Core\Cache\Backend\NullBackend::class; ``` I get: ``` (1/1) Exception Serialization of 'Closure' is not allowed in /var/www/html/TYPO3.CMS/typo3/sysext/core/Classes/Cache/Frontend/VariableFrontend.php line 60 ]; GeneralUtility::callUserFunction($_funcRef, $params, $this); } if (!$this->backend instanceof TransientBackendInterface) { $variable = serialize($variable); (1/1) Exception Serialization of 'Closure' is not allowed in /var/www/html/TYPO3.CMS/typo3/sysext/core/Classes/Cache/Frontend/VariableFrontend.php line 60 ]; GeneralUtility::callUserFunction($_funcRef, $params, $this); } if (!$this->backend instanceof TransientBackendInterface) { $variable = serialize($variable); ``` …when opening the install tool. I think the patch is fine in general to be applied, but does not fix the reported issue (we should remove the respective `Resolves`) line and instead statically configure runtime to be a transient memory cache, without being configurable.
  5. Benjamin Franzke commented on patch set 1 12/10/24, 15:38

    Reply

    We could fix that by using ``` if (!$this->backend instanceof TransientBackendInterface && !$this->backend instanceof NullBackend) ``` in VariableFrontend, but then we run into the next issue `LocalizationUtility::buildLanguageService`. Therefore I suggest to use another approach: https://review.typo3.org/c/Packages/TYPO3.CMS/+/87421
  6. Benni Mack abandoned the change 12/10/24, 17:22

    abandoned, see other approach