94464[BUGFIX] Handle the case where encryptionKey is not set
Commit message
Review
-
Code review CR +1
- Oliver Klee +1
- Oliver Hader +1
-
Verified V +1
- Oliver Klee +1
- Oliver Hader +1
- core-ci +1 CI
Issues 2
Files 1
Review log 1314
-
Benjamin Franzke uploaded patch set 1 06/10/26, 11:42
-
core-ci voted on patch set 1 V +1 06/10/26, 11:52 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/103320
-
Oliver Klee voted on patch set 1 CR +1 V +1 06/10/26, 12:01
-
Oliver Hader voted on patch set 1 CR +1 V +1 06/10/26, 12:03
-
Garvin Hicking commented on patch set 1 06/10/26, 12:04
-
Garvin Hicking commented on patch set 1 06/10/26, 12:05
HashService.php:42Reply... maybe we also need to spceifically catch the install tool context here; otherwise consumers of this when missing an encryption key (or something influences the encryption key) might generate unsafe values. So maybe still throw on "usual" cases for consumers, and just exclude install tool? -
Benjamin Franzke commented on patch set 1 06/10/26, 12:10
HashService.php:42ReplyAll non-install tool usages are covered by https://github.com/TYPO3/typo3/blob/806967fa211062ec3d15b48a0794d8520d9ccaf7/typo3/sysext/core/Classes/Core/Bootstrap.php#L152 One addtional "usecase" that I could think of are btw functional tests that use a cache without a mocked encryption key. -
Garvin Hicking commented on patch set 1 06/10/26, 12:26
HashService.php:42ReplyThat could also be circumvented by extensions or others manipulation the encryptionKey on the fly (intentionally or accidentally). I would argue HashService should also gate against runtime modification that makes this moot, and I would also argue functional tests should mock a fixed encryption key for explicitness... -
Benjamin Franzke commented on patch set 1 06/10/26, 14:23
HashService.php:42ReplyYes, I agree, for `main` we should be more strict and require respective tests to have a respective setup, but for the released versions I'd like to make this less "breaking": https://forge.typo3.org/issues/110031#note-8 > That could also be circumvented by extensions or others manipulation the encryptionKey on the fly (intentionally or accidentally). Maybe that's another topic? I mean that's something we can discuss for sure, but runtime manipulation by *extensions* is something we "never" handle, since an extension could basically manipulate everything. There isn't a sandbox or so… -
Helmut Hummel commented on patch set 1 06/10/26, 16:43
HashService.php:42ReplyI think the security change was already a high impact change, pushed to released branches. Therefore I would choose an adequate change (identical to main) for those branches as well, like these issues would have been discovered beforehand. That said, I would rather propose to let the NullBackend implement the TransientBackendInterface, so that serialisation does not happen at all in VariableFrontend. This is a logical change, that can be safely applied to all branches and would also make this workaround obsolete: https://review.typo3.org/c/Packages/TYPO3.CMS/+/94463 -
Garvin Hicking commented on patch set 1 06/10/26, 16:45
HashService.php:42ReplyI am fine with covering more strictness in a followup for main, resolving this comment. -
Helmut Hummel commented on patch set 1 06/10/26, 17:32
HashService.php:42I think the security change was already a high impact change, pushed to released branches. Therefore I would choose an adequate change (identical to main) for those branches as well, like these issues would have been discovered beforehand. That said, I would rather propose to let the NullBackend implement the TransientBackendInterface, so that serialisation does not happen at all in VariableFrontend. This is a logical change, that can be safely applied to all branches and would also make this workaround obsolete: https://review.typo3.org/c/Packages/TYPO3.CMS/+/94463 -
Helmut Hummel commented on patch set 1 06/10/26, 18:57
HashService.php:42Reply UnresolvedPushed an alternative: https://review.typo3.org/c/Packages/TYPO3.CMS/+/94473 -
Benjamin Franzke abandoned the change 06/11/26, 05:52
Abandon in favor of https://review.typo3.org/c/Packages/TYPO3.CMS/+/94473
HashService.php:42