Review main Ready for review

91487[TASK] Centralize hash usages

Oliver Hader CR 0 V 0 Hard +322 −102 updated 11/21/26, 17:37

Commit message

Hash algorithms are used through the HashAlgo enum instead of
calling md5(), sha1() or hash() directly:

* Non-cryptographic usages like cache identifiers, DOM element ids
  or file names use HashAlgo::canonicalize(), which is xxh128. It
  replaces md5() and xxh3 in these places.
* Cryptographic usages and usages kept for compatibility retain
  their algorithm and use the matching enum case, e.g. SHA1 for
  file hashes and TOTP, MD5 for phpass and soft reference tokens.
* Random identifiers are created by Random::generateRandomHexString()
  instead of hashing a unique id.

Stored values keep working: toggled page TSconfig conditions in the
backend user module data and file elements of a saved clipboard,
which are identified by the previous hashes, are migrated.

Generated values differ for new records only: fallback slugs
("default-<hash>"), identifiers of automatically created site
configurations (now "autogenerated-<pid>") and usernames generated
for new backend users. Cache entries and temporary files get new
identifiers, existing processed files stay valid.

Test this change

Run a command in your clone of the TYPO3 Core. Then try what the change does and vote on Verified in Gerrit. How to review a patch

Check out patch set 7
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/87/91487/7 && git checkout FETCH_HEAD
Cherry-pick onto main
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/87/91487/7 && git cherry-pick FETCH_HEAD

Review

  • Code review CR 0 Needs a vote
  • Verified V 0 Needs a vote
    • core-ci +1 CI

Merge conflicts 77

Issues 1

Files 54

Show 34 more files

Review log 916

  1. Oliver Hader uploaded patch set 1 11/10/25, 20:08

  2. Oliver Hader marked it work in progress 11/10/25, 20:09

  3. Oliver Hader uploaded patch set 2 11/10/25, 20:10

  4. core-ci voted on patch set 1 V -1 11/10/25, 20:12 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/88899

  5. core-ci voted on patch set 2 V -1 11/10/25, 20:25 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/88900

  6. Oliver Hader uploaded patch set 3 V -1 11/10/25, 20:41

  7. core-ci voted on patch set 3 V -1 11/10/25, 20:56 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/88907

  8. Benni Mack uploaded patch set 4 V -1 08/12/26, 15:47

  9. core-ci voted on patch set 4 V -1 08/12/26, 16:01 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/106556

  10. Benni Mack uploaded patch set 5 V -1 09/11/26, 23:10

  11. core-ci voted on patch set 5 V +1 09/11/26, 23:19 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/108365

  12. Torben Hansen uploaded patch set 6 V +1 11/21/26, 13:37

  13. core-ci voted on patch set 6 V +1 11/21/26, 13:43 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/115114

  14. Benni Mack marked it ready for review 11/21/26, 15:08

  15. Torben Hansen updated the commit message in patch set 7 V +1 11/21/26, 17:28

  16. core-ci voted on patch set 7 V +1 11/21/26, 17:37 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/115119