Review main Merged

90227[BUGFIX] Fix default value of TYPO3_CONF_VARS/BE/lockRootPath

Albrecht Köhnlein CR +2 V +2 Easy +1 −1 updated 08/04/25, 14:05

Commit message

In older versions, `['TYPO3_CONF_VARS']['BE']['lockRootPath']` was a
string and it was changed to be an array in a security update [1]. But
the default value still was a string.

[1] https://docs.typo3.org/c/typo3/cms-core/main/en-us/Changelog/11.5.x/Important-102800-FileAbstractionLayerEnforcesAbsolutePathsToMatchProjectRootOrLockRootPath.html

Review

  • Code review CR +2 Done
    • Oliver Hader +2
    • Oli Bartsch +1
    • Oliver Klee +1
    • Markus Klein +1
    • Garvin Hicking +1
    • Peter Kraume +1
  • Verified V +2 Done
    • Oliver Hader +2
    • Oli Bartsch +1
    • Oliver Klee +1
    • Markus Klein +1
    • Garvin Hicking +1
    • Peter Kraume +1
    • core-ci +1 CI

Issues 2

Files 1

Review log 2732

Show 67 earlier messages
  1. Albrecht Köhnlein uploaded patch set 1 08/04/25, 06:57

  2. core-ci voted on patch set 1 V +1 08/04/25, 07:04 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/82720

  3. Peter Kraume voted on patch set 1 CR +1 V +1 08/04/25, 07:46

  4. Markus Klein voted on patch set 1 CR +1 V +1 08/04/25, 08:55

  5. Oliver Klee voted on patch set 1 CR +1 V +1 08/04/25, 09:02

  6. Oliver Klee commented on patch set 1 08/04/25, 09:08

    Should we also fix this for 12.4 (which also is affected)?
  7. Albrecht Köhnlein updated the commit message in patch set 2 CR +1 V +1 08/04/25, 09:17

  1. Albrecht Köhnlein updated the commit message in patch set 3 08/04/25, 09:19

  2. Albrecht Köhnlein commented on patch set 3 08/04/25, 09:20

    Reply

    I found the changelog entry and added a link to it. I think it's even better than a link to the documentation in this case.

    Reply

    Thanks. You're right.
  3. core-ci voted on patch set 2 V +1 08/04/25, 09:25 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/82728

  4. core-ci voted on patch set 3 V +1 08/04/25, 09:27 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/82729

  5. Oli Bartsch commented on patch set 3 08/04/25, 09:29

    I fail to reproduce this error. Can you give me some advice where this fails?
  6. Oliver Hader commented on patch set 3 08/04/25, 09:29

    I'm just testing the other way, having the default value as empty array `[]`, but some additional config trying to string concat. ``` <?php $config = [ 'lockRootPath' => [], ]; $config['lockRootPath'] .= 'first'; # $config['lockRootPath'][] = 'first'; var_dump($config); ``` This works, but has `'lockRootPath' => 'Arrayfirst'`. I think it would have been better (back then) to introduce a new `lockRootPaths` (plural) and phase out the original `lockRootPath` (singular).
  7. Oliver Klee updated the commit message in patch set 4 V +1 08/04/25, 09:31

  8. Oliver Klee voted on patch set 4 CR +1 V +1 08/04/25, 09:31

  9. Garvin Hicking updated the commit message in patch set 5 CR +1 V +1 08/04/25, 09:35

  10. Oliver Klee voted on patch set 5 CR +1 V +1 08/04/25, 09:37

  11. Albrecht Köhnlein commented on patch set 4 08/04/25, 09:38

    Reply

    What would you recommend? Remove the compatibilty fallback in https://github.com/TYPO3/typo3/blob/e1e0ce8e3059d1910dd6f3ed8443c27b6c6d12d1/typo3/sysext/core/Classes/Utility/PathUtility.php#L463 and make this a breaking change instead of a bugfix?

    Reply

    I simply need to add ```$GLOBALS['TYPO3_CONF_VARS']['BE']['lockRootPath'][] = '/path/to/shared';``` into my `system/additional.php` file to run into this error.
  12. core-ci voted on patch set 4 V +1 08/04/25, 09:39 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/82731

  13. Garvin Hicking commented on patch set 5 08/04/25, 09:42

    Reply

    Would someone do string concatenation on it? In the string variant, only a single path was allowed... so I would argue this usescase might not happen in reality? (agreed on "lockRootPaths" having been better - but switching to array completely sounds good to me, unsure about the v12 backport though tbh).
  14. core-ci voted on patch set 5 V +1 08/04/25, 09:43 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/82733

  15. Oliver Hader commented on patch set 5 08/04/25, 10:37

    Reply

    I forgot, that only one path was allowed in the past. Thanks for pointing this out. I've added an overview matrix at https://forge.typo3.org/issues/107199#note-13 Thus, I don't see any aspects, how the patch above might introduce an additional misbehavior → "looks good from my POV"
  16. Oliver Hader voted on patch set 5 CR +1 V +1 08/04/25, 11:24

  17. Oliver Hader commented on patch set 5 08/04/25, 11:25

    Reply

    Done

    Reply

    Acknowledged
  18. Oli Bartsch commented on patch set 5 08/04/25, 11:27

    Reply

    All right, thanks.
  19. Oli Bartsch voted on patch set 5 CR +1 V +1 08/04/25, 11:28

  20. Peter Kraume voted on patch set 5 CR +1 V +1 08/04/25, 11:34

  21. Markus Klein voted on patch set 5 CR +1 V +1 08/04/25, 12:04

  22. Garvin Hicking commented on patch set 5 CR +2 V +2 08/04/25, 12:13

    Reply

    I love your Matrix, that couldmve been me 😂
  23. Garvin Hicking voted on patch set 5 CR +1 V +1 08/04/25, 12:13

  24. Oliver Hader voted on patch set 5 CR +2 V +2 08/04/25, 14:04

  25. Oliver Hader merged patch set 6 08/04/25, 14:05