Review main Merged

90668[FEATURE] Support more hashing algos in FAL

Andreas Kienast CR +2 V +2 Normal +35 −24 updated 09/15/25, 06:02

Commit message

Previously, FAL's `LocalDriver` only supported `md5` and `sha1` as
hashing algorithms. While this may be good enough, it might be necessary
to use different hashing algorithms, depending on the use-case.

The method `LocalDriver->hash()` is now able to use any hashing
algorithm that is registered in PHP itself by building a `HashContext`
object and updating it by streaming the file content.

Review

  • Code review CR +2 Done
    • Andreas Kienast +2
    • Oliver Klee +1
    • Garvin Hicking +1
    • Mathias Brodala +1
    • Simon Schaufelberger +1
  • Verified V +2 Done
    • Andreas Kienast +2
    • Garvin Hicking +1
    • Simon Schaufelberger +1
    • core-ci +1 CI

Issues 1

Files 3

Review log 1417

  1. Andreas Kienast uploaded patch set 1 09/12/25, 06:17

  2. Andreas Kienast updated the commit message in patch set 2 09/12/25, 06:17

  3. core-ci voted on patch set 1 V +1 09/12/25, 06:25 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/84880

  4. core-ci voted on patch set 2 V +1 09/12/25, 06:26 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/84881

  5. Mathias Brodala commented on patch set 2 09/12/25, 06:43

    LocalDriver.php:703

    We could avoid the premature check since hash_init() already does this internally and throws a ValueException for unsupported algorithms: https://www.php.net/hash_init
  6. Andreas Kienast commented on patch set 2 09/12/25, 06:46

    LocalDriver.php:703 Reply

    Fair enough. The `ValueError` thrown by PHP is as vague as our own exception.
  7. Andreas Kienast uploaded patch set 3 V +1 09/12/25, 06:46

  8. Andreas Kienast commented on patch set 3 09/12/25, 06:46

    LocalDriver.php:703 Reply

    Done
  9. Mathias Brodala voted on patch set 3 CR +1 09/12/25, 06:49

  10. core-ci voted on patch set 3 V +1 09/12/25, 06:54 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/84882

  11. Simon Schaufelberger voted on patch set 3 CR +1 V +1 09/12/25, 21:19

  12. Garvin Hicking voted on patch set 3 CR +1 V +1 09/12/25, 21:43

  13. Oliver Klee voted on patch set 3 CR +1 09/13/25, 07:50

  14. Georg Ringer commented on patch set 3 09/13/25, 08:26

    what does that mean for updating when a different hash is used? what will be duplicated?
  15. Andreas Kienast commented on patch set 3 09/13/25, 09:32

    Reply

    Not sure what you mean. Why should anything get duplicated? This patch doesn‘t change what hashed are stored by FAL.
  16. Andreas Kienast voted on patch set 3 CR +2 V +2 09/15/25, 06:02

  17. Andreas Kienast merged patch set 4 09/15/25, 06:02