91815[!!!][TASK] Use stronger cryptographic algorithm for HMAC
Commit message
Review
-
Code review CR +2 Done
- Georg Ringer +2
- Lina Wolf +1
- Christian Kuhn +1
-
Verified V +2 Done
- Georg Ringer +2
- Lina Wolf +1
- Christian Kuhn +1
- core-ci +1 CI
Issues 1
Files 65
- typo3/sysext/backend/Classes/Authentication/PasswordReset.php+3 −2
- typo3/sysext/backend/Classes/Controller/Security/SudoModeController.php+3 −2
- typo3/sysext/backend/Tests/Functional/Controller/MfaConfigurationControllerTest.php+2 −1
- typo3/sysext/backend/Tests/Functional/Controller/MfaSetupControllerTest.php+3 −2
- typo3/sysext/backend/ext_tables.sql+1 −1
- typo3/sysext/core/Classes/Authentication/Mfa/Provider/RecoveryCodesProvider.php+3 −2
- typo3/sysext/core/Classes/Authentication/Mfa/Provider/TotpProvider.php+3 −2
- typo3/sysext/core/Classes/Controller/FileDumpController.php+2 −1
- typo3/sysext/core/Classes/Crypto/HashAlgo.phpnew+77 −0
- typo3/sysext/core/Classes/Crypto/HashService.php4+22 −11
- typo3/sysext/core/Classes/FormProtection/AbstractFormProtection.php+3 −2
- typo3/sysext/core/Classes/Resource/ResourceStorage.php+2 −1
- typo3/sysext/core/Classes/Routing/PageRouter.php+7 −1
- typo3/sysext/core/Classes/Session/Backend/DatabaseSessionBackend.php2+4 −3
- typo3/sysext/core/Classes/Session/Backend/RedisSessionBackend.php+5 −3
- typo3/sysext/core/Configuration/DefaultConfiguration.php+2 −0
- typo3/sysext/core/Configuration/DefaultConfigurationDescription.yaml+3 −0
- typo3/sysext/core/Documentation/Changelog/14.0/Breaking-106307-UseStrongerCryptographicAlgorithmForHMAC.rst3new+120 −0
- typo3/sysext/core/Tests/Functional/Authentication/Mfa/Provider/RecoveryCodesProviderTest.php+2 −1
- typo3/sysext/core/Tests/Functional/Authentication/Mfa/Provider/TotpProviderTest.php+2 −1
Show 45 more files
- typo3/sysext/core/Tests/Functional/Session/Backend/DatabaseSessionBackendTest.php+1 −1
- typo3/sysext/core/Tests/Functional/Session/Backend/RedisSessionBackendTest.php4+1 −1
- typo3/sysext/core/Tests/Functional/Session/SessionManagerTest.php+27 −3
- typo3/sysext/core/Tests/Unit/Crypto/HashServiceTest.php+23 −8
- typo3/sysext/core/Tests/Unit/FormProtection/AbstractFormProtectionTest.php+1 −1
- typo3/sysext/core/Tests/Unit/FormProtection/BackendFormProtectionTest.php+3 −1
- typo3/sysext/core/Tests/Unit/FormProtection/InstallToolFormProtectionTest.php+3 −1
- typo3/sysext/core/Tests/Unit/Session/SessionManagerTest.php1+0 −26
- typo3/sysext/extbase/Classes/Mvc/Controller/ActionController.php+7 −2
- typo3/sysext/extbase/Classes/Mvc/Controller/MvcPropertyMappingConfigurationService.php+3 −2
- typo3/sysext/extbase/Tests/Functional/Mvc/Controller/BlogPostEditingControllerTest.php+23 −15
- typo3/sysext/extbase/Tests/Functional/Mvc/Controller/FileUploadControllerTest.php+3 −3
- typo3/sysext/extbase/Tests/Functional/Mvc/Validation/ActionControllerValidationTest.php+4 −3
- typo3/sysext/extbase/Tests/Unit/Mvc/Controller/MvcPropertyMappingConfigurationServiceTest.php+5 −4
- typo3/sysext/felogin/Classes/Configuration/RecoveryConfiguration.php+2 −1
- typo3/sysext/felogin/Classes/Controller/PasswordRecoveryController.php+6 −5
- typo3/sysext/felogin/ext_tables.sql+1 −1
- typo3/sysext/fluid/Classes/ViewHelpers/FormViewHelper.php+3 −2
- typo3/sysext/fluid/Tests/Functional/ViewHelpers/Link/ActionViewHelperTest.php+53 −24
- typo3/sysext/fluid/Tests/Functional/ViewHelpers/Link/PageViewHelperTest.php+2 −2
- typo3/sysext/fluid/Tests/Functional/ViewHelpers/Link/TypolinkViewHelperTest.php+8 −8
- typo3/sysext/fluid/Tests/Functional/ViewHelpers/Uri/ActionViewHelperTest.php+34 −17
- typo3/sysext/fluid/Tests/Functional/ViewHelpers/Uri/PageViewHelperTest.php+2 −2
- typo3/sysext/fluid/Tests/Functional/ViewHelpers/Uri/TypolinkViewHelperTest.php+2 −2
- typo3/sysext/fluid/Tests/Functional/ViewHelpers/FormViewHelperTest.php+3 −3
- typo3/sysext/form/Classes/Domain/Runtime/FormRuntime/FormSession.php+3 −2
- typo3/sysext/form/Classes/Domain/Runtime/FormRuntime.php+2 −1
- typo3/sysext/form/Classes/ViewHelpers/FormViewHelper.php+3 −1
- typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php+2 −1
- typo3/sysext/frontend/Classes/Controller/ShowImageController.php+2 −1
- typo3/sysext/frontend/Classes/Middleware/PageArgumentValidator.php+6 −0
- typo3/sysext/frontend/Classes/Page/CacheHashCalculator.php5+32 −16
- typo3/sysext/frontend/Tests/Functional/Controller/ShowImageControllerTest.php+3 −2
- typo3/sysext/frontend/Tests/Functional/SiteHandling/EnhancerLinkGenerator/RouteTest.php+15 −3
- typo3/sysext/frontend/Tests/Functional/SiteHandling/EnhancerSiteRequest/LocaleModifierTest.php+6 −6
- typo3/sysext/frontend/Tests/Functional/SiteHandling/EnhancerSiteRequest/RouteTest.php+18 −6
- typo3/sysext/frontend/Tests/Functional/SiteHandling/AbstractTestCase.php+11 −0
- typo3/sysext/frontend/Tests/Functional/SiteHandling/PageRouterTest.php+1 −1
- typo3/sysext/frontend/Tests/Functional/SiteHandling/SiteRequestTest.php3+8 −1
- typo3/sysext/frontend/Tests/Functional/SiteHandling/SlugLinkGeneratorTest.php+26 −26
- typo3/sysext/frontend/Tests/Functional/SiteHandling/SlugSiteRequestTest.php+3 −3
- typo3/sysext/frontend/Tests/Functional/SiteHandling/SlugSiteWithoutRequiredCHashRequestTest.php+3 −3
- typo3/sysext/frontend/Tests/Functional/SiteHandling/TypoLinkGeneratorTest.php+2 −2
- typo3/sysext/frontend/Tests/Unit/Page/CacheHashCalculatorTest.php+33 −23
- typo3/sysext/redirects/Tests/Functional/Service/RedirectServiceTest.php+19 −10
Review log 2634
Show 59 earlier messages
-
Oliver Hader uploaded patch set 1 11/22/25, 13:21
-
core-ci voted on patch set 1 V -1 11/22/25, 13:36 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/90637
-
Oliver Hader uploaded patch set 2
V -111/22/25, 14:11 -
core-ci voted on patch set 2 V -1 11/22/25, 14:52 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/90643
-
Oliver Hader uploaded patch set 3
V -111/22/25, 15:09 -
core-ci voted on patch set 3 V -1 11/22/25, 15:24 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/90650
-
Oliver Hader uploaded patch set 4
V -111/22/25, 16:16 -
core-ci voted on patch set 4 V -1 11/22/25, 16:33 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/90659
-
Torben Hansen commented on patch set 4 11/22/25, 17:54
-
Oliver Hader uploaded patch set 5
V -111/22/25, 19:40 -
Oliver Hader commented on patch set 5 11/22/25, 19:41
Breaking-106307-UseStrongerCryptographicAlgorithmForHMAC.rst:90ReplyThanks. I still need to overwork the RST file again... I got distracted by the failing tests... -
core-ci voted on patch set 5 V +1 11/22/25, 19:53 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/90687
-
Oliver Hader uploaded patch set 6
V +111/22/25, 21:09 -
Oliver Hader commented on patch set 6 11/22/25, 21:10
Breaking-106307-UseStrongerCryptographicAlgorithmForHMAC.rst:90ReplyDone -
Oliver Hader commented on patch set 6 11/22/25, 21:20
This change is ready for review. -
core-ci voted on patch set 6 V +1 11/22/25, 21:20 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/90694
-
Christian Kuhn commented on patch set 6 11/22/25, 21:41
HashService.php:35what's the future strategy here? we'll later change the default and/or skip the argument entirely? this will happen in v15?RedisSessionBackendTest.php:66nit: the easy and simple solution in functional (not unit) tests is $subject = $this->get(SubjectClass::class) - to let DI handle by framework. similar i other files.CacheHashCalculator.php:28yay. readonly. and singletonInterface can be skipped (but keep the public: true, then).SiteRequestTest.php:38nit: we try to keep this in the properties directly - it's more obvious. -
Oliver Hader uploaded patch set 7
V +111/22/25, 22:10 -
Oliver Hader commented on patch set 6 11/22/25, 22:10
HashService.php:35ReplyMy plan would be to use the `HashAlgo` enum to identify where hashes are used in the TYPO3 core. In a next step, the usages are separated by use-case (e.g. "canonical" for generating a unique identifier, without having crypto demands, "http-signature" like in cHash, "payload-signature" for arbitrary data like forms). Each of these use-cases might(!) become the possibility to configure the corresponding default `HashAlgo`. Thus, for the occurrences in `HashService` the `$algo` parameter will probably change in the future.RedisSessionBackendTest.php:66ReplyDoneCacheHashCalculator.php:28ReplyDropping `SingletonInterface` is fine. Introducing `readonly` conflicts with having `setConfiguration()` (which would be another breaking change in case we drop it) → okay in general, but in another patch-setCacheHashConfiguration.php:103Not required anymore...SiteRequestTest.php:38ReplySince the class extends `\TYPO3\CMS\Frontend\Tests\Functional\SiteHandling\AbstractTestCase` all existing settings would have to be duplicated. Personally I'd prefer to keep it the way it is. -
core-ci voted on patch set 7 V -1 11/22/25, 22:20 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/90699
-
Oliver Hader uploaded patch set 8
V -111/22/25, 22:33 -
Oliver Hader commented on patch set 8 11/22/25, 22:33
RedisSessionBackendTest.php:66ReplyInstall Tools currently fails due to the lack of DI. I guess, I'll revert that particular change and won't inject `HashService` into the session backends. -
Oliver Hader commented on patch set 8 11/22/25, 22:37
SessionManagerTest.php:30Both methods were moved to the corresponding functional test. -
core-ci voted on patch set 8 V +1 11/22/25, 22:41 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/90704
-
Oliver Hader commented on patch set 8 11/22/25, 23:06
HashService.php:35ReplyIn case you dislike the additional parameter `$algo` it also would be possible to add a new `HashServiceFactory`. The call might look like this then: ``` $hmac = $hashServiceFactory ->create(HashAlgo::SHA3_256) ->hmac('input', 'my-additional-secret'); ``` -
Christian Kuhn commented on patch set 8 11/22/25, 23:11
HashService.php:35Replyi see. thx!DatabaseSessionBackend.php:36risky with this class being stateful. might be better to shared:false it. or makeInstance() for now to additionally resolve the install tool DI issue: alternative is to hard code DI in serviceProvider.php, which would imho be fine for such central classes, but maybe makeInstance is for now just a bit more easy.RedisSessionBackendTest.php:66Replyfine to use makeInstance for now - the session backends are also stateful, we would probably want to resolve this as well for DI.CacheHashCalculator.php:28Replyah setConfiguration. yes. that should be removed as breaking change quickly: its used in tests only and it shouldn't be an issue to drop it. i can prepare a change if you want me to.SiteRequestTest.php:38Replyis see. ok. -
Oliver Hader commented on patch set 8 11/22/25, 23:15
DatabaseSessionBackend.php:36ReplyI already rolled back the previous change, no DI or auto-config is used in both classes implementing `SessionBackendInterface`CacheHashCalculator.php:28ReplyIn case you have time, sure, please go ahead and "get rid" or `setConfiguration()` :) -
Christian Kuhn commented on patch set 8 11/22/25, 23:22
CacheHashCalculator.php:28Replyscratch that. this is more borked since CachHashConfiguration is a data object and should vanish from __construct entirely. didn't realize this is yet another stateful singleton with data :/ -
Christian Kuhn voted on patch set 8 CR +1 V +1 11/22/25, 23:29
-
Lina Wolf commented on patch set 8 CR +1 V +1 11/23/25, 06:16
I tried out this change locally and found no ill effect, I tried to look at the code, didnt find anything obvious but dont understand it in detail so take my vote with a grain of salt. -
Georg Ringer voted on patch set 8 CR +2 V +2 11/23/25, 06:27
-
Georg Ringer merged patch set 9 11/23/25, 06:27
-
Oliver Hader commented on patch set 9 11/23/25, 09:30
Sorry, admonitions are incorrect here as well... -
Lina Wolf commented on patch set 9 11/23/25, 11:01
Reply
Don't worry, I currently review changelogs in https://review.typo3.org/c/Packages/TYPO3.CMS/+/91436
Breaking-106307-UseStrongerCryptographicAlgorithmForHMAC.rst:90