92592[BUGFIX] Prevent evaluating hidden TypoScript in backend modules
Commit message
Review
-
Code review CR +2 Done
- Garvin Hicking +2
- Georg Ringer +1
- Oliver Hader +1
-
Verified V +2 Done
- Garvin Hicking +2
- Georg Ringer +1
- Eike Starkmann +1
- Oliver Hader +1
- core-ci +1 CI
Issues 2
Files 9
- typo3/sysext/core/Classes/TypoScript/IncludeTree/SysTemplateRepository.php+14 −6
- typo3/sysext/core/Tests/Functional/TypoScript/IncludeTree/Fixtures/SysTemplate/twoPagesTwoTemplatesOneDeleted.csvnew+8 −0
- typo3/sysext/core/Tests/Functional/TypoScript/IncludeTree/Fixtures/SysTemplate/twoPagesTwoTemplatesOneHidden.csvnew+8 −0
- typo3/sysext/core/Tests/Functional/TypoScript/IncludeTree/Fixtures/SysTemplate/twoPagesTwoTemplatesOneTimedOut.csvnew+8 −0
- typo3/sysext/core/Tests/Functional/TypoScript/IncludeTree/SysTemplateRepositoryTest.php+139 −0
- typo3/sysext/tstemplate/Classes/Controller/AbstractTemplateModuleController.php4+21 −0
- typo3/sysext/tstemplate/Classes/Controller/ActiveTypoScriptController.php3+2 −2
- typo3/sysext/tstemplate/Classes/Controller/ConstantEditorController.php2+2 −2
- typo3/sysext/tstemplate/Classes/Controller/TemplateAnalyzerController.php2+3 −3
Review log 2429
Show 34 earlier messages
-
Garvin Hicking uploaded patch set 1 01/30/26, 16:15
-
Garvin Hicking commented on patch set 1 01/30/26, 16:15
NOTE: This bug is also present in 12.4. Even though the bug is annoying, a possible negative impact could be worse. So I'm seeing this for v13 and main scope only. -
Oliver Klee voted on patch set 1 CR +1 01/30/26, 16:16
-
core-ci voted on patch set 1 V +1 01/30/26, 16:49 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/94687
-
Garvin Hicking updated the commit message in patch set 2
CR +1V +101/30/26, 17:20 -
Garvin Hicking commented on patch set 2 01/30/26, 17:21
Will need to check if starttime/endtime is properly respected in backend context too (I guess not) -
Garvin Hicking voted on patch set 2 CR -1 01/30/26, 17:21
-
core-ci voted on patch set 2 V +1 01/30/26, 17:28 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/94692
-
Oliver Hader commented on patch set 2 01/30/26, 17:34
ActiveTypoScriptController.php:108`getAllTemplateRecordsOnPage` currently also resolves hidden records (they appear in the selector field in the backend)ConstantEditorController.php:89`getAllTemplateRecordsOnPage` currently also resolves hidden records (they appear in the selector field in the backend)TemplateAnalyzerController.php:92`getAllTemplateRecordsOnPage` currently also resolves hidden records (they appear in the selector field in the backend) -
Garvin Hicking uploaded patch set 3
CR -1V +101/30/26, 19:50 -
Garvin Hicking commented on patch set 3 01/30/26, 19:56
ActiveTypoScriptController.php:108ReplyThis should still work as it does not access the `getSysTemplateQueryRestrictionContainer` method of `SysTemplateRepository`, but rather its own raw query. And the selector should probably show access to every record as long as it is not deleted. Or did I misunderstand you? Thanks for checking! This drove me nuts today, I had two hours of test failures just because my tests messed with the "Context" singleton... %-) -
Garvin Hicking commented on patch set 3 01/30/26, 19:57
Reply
Narrator: It did not respect it. Tried to address it. -
core-ci voted on patch set 3 V +1 01/30/26, 19:59 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/94702
-
Markus Klein voted on patch set 3 CR +1 02/05/26, 13:37
-
Hendrik Reimers voted on patch set 3 CR +1 02/08/26, 20:32
-
Hendrik Reimers voted on patch set 3 V +1 02/08/26, 20:32
-
Oliver Hader commented on patch set 3 02/09/26, 15:41
AbstractTemplateModuleController.php:304I personally dislike, that the global `Context` singleton is updated with a specific visibility aspect, which is actually only meant to be applied for templates - but when assigned to `$context` becomes effective for anything else. I think a more explicit (but more complicated) approach would be to optionally forward the manipulated `VisibilityAspect` to each repository method. -
Oliver Hader commented on patch set 3 02/09/26, 15:42
ActiveTypoScriptController.php:108ReplyTrue. I was wrong here. Hidden `sys_template` records should still appear in the selectors, that's fine.ConstantEditorController.php:89ReplyDoneTemplateAnalyzerController.php:92ReplyDone -
Oliver Hader commented on patch set 3 02/09/26, 15:46
AbstractTemplateModuleController.php:304ReplyI created a fork of your patch with adjustments, making the adjusted visibility aspect more explicit, see https://review.typo3.org/c/Packages/TYPO3.CMS/+/92756/1..2 -
Oliver Hader uploaded patch set 4
CR +1V +102/09/26, 16:16 -
Oliver Hader commented on patch set 4 CR +1 V +1 02/09/26, 16:18
AbstractTemplateModuleController.php:304ReplyDone -
core-ci voted on patch set 4 V -1 02/09/26, 16:24 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/95478
-
Eike Starkmann commented on patch set 4 V +1 02/09/26, 16:55
Looks good to me, i tested manually via patch. It also works under TYPO3 12 -
Garvin Hicking commented on patch set 4 CR +1 V +1 02/09/26, 17:14
AbstractTemplateModuleController.php:304ReplyThanks Olly, just to state this here, I'm of course fine with the changes. My original intent was to manipulate this so that any future operations in context of the backend module would utilize that visibilityAspect. But I see that an explicit visibility assignment is better than an implicit one. Thanks for checking. -
Garvin Hicking commented on patch set 4 02/09/26, 17:18
(Note, CI red is sadly due to a flakey test or CI issue, not related to this patch) -
Georg Ringer voted on patch set 4 CR +1 V +1 02/09/26, 17:19
-
core-ci voted on patch set 4 V +1 02/09/26, 17:27 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/95478
-
Garvin Hicking commented on patch set 4 CR +2 V +2 02/09/26, 17:28
thanks so much everyone 😊 -
Garvin Hicking merged patch set 5 02/09/26, 17:57