76133[BUGFIX] Remove dependency injection from resource controller
Commit message
Review
-
Code review CR 0
-
Verified V 0
Issues 2
Files 5
- typo3/sysext/rte_ckeditor/Classes/Controller/ResourceController.php1+12 −10
- typo3/sysext/rte_ckeditor/Classes/Form/Element/RichTextElement.php2+1 −1
- typo3/sysext/rte_ckeditor/Classes/Service/ScssProcessor.php1+5 −3
- typo3/sysext/rte_ckeditor/Configuration/Services.yaml+0 −12
- typo3/sysext/rte_ckeditor/Tests/Unit/Service/ScssProcessorTest.php+2 −3
Review log 79
-
Oliver Hader uploaded patch set 1 10/17/22, 21:54
-
core-ci voted on patch set 1 V +1 10/17/22, 22:02 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/32406
-
Frank Nägler commented on patch set 1 10/18/22, 06:36
Just to be sure and understand the patch, DI via constructor is not working, but with GU::makeInstance? That is the solution for the core? Or why constructor is not working? -
Oli Bartsch updated the commit message in patch set 2 10/18/22, 10:20
-
core-ci voted on patch set 2 V +1 10/18/22, 10:28 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/32428
-
Benni Mack voted on patch set 2 CR +1 10/20/22, 15:04
-
Christian Kuhn commented on patch set 2 CR -1 10/21/22, 20:06
ResourceController.php:46Unresolveduse constructor property promotion.RichTextElement.php:145i don't like this architecture much: controllers should always only be used by request handlers, calling a controller method by some lower-level class is fishy. is it possible to create a better abstraction here?ScssProcessor.php:34Unresolveduse constructor property promotion. -
Oliver Hader commented on patch set 2 10/22/22, 08:04
RichTextElement.php:145Reply UnresolvedNo shit Sherlock, this is literally what is written as comment in the other class: https://review.typo3.org/c/Packages/TYPO3.CMS/+/76133/2/typo3/sysext/rte_ckeditor/Classes/Controller/ResourceController.php#b82 > // this is shit and needs to be a general token/payload component, having signatures (JWT?) Anyway, it is a static function (not an instance method). Basically the controller knows best which arguments it accepts and needs to verify. Changing this, requires a generic approach, which does not exist yet (like OpenAPI). Other HMAC implementations in the core just repeat the hashing logic - at the location where the hash is generated, and again at the place were the hash is verified. This is even more of a bad architecture. Example? Just search for `'resourceStorageDumpFile'` in the sources... -
Oliver Hader abandoned the change 10/22/22, 08:05
I'm dropping this change, I cannot reproduce the DI problems I had last Monday without this patch anymore...