Review main Merged

70176[TASK] Deprecate GeneralUtility::shortMD5()

Andreas Kienast CR +2 V +2 Normal +82 −35 updated 08/12/21, 11:01

Commit message

The method GeneralUtility::shortMD5() generates an MD5 hash and trims it
to a configurable length, where 10 characters is the default. This
increases the probability of conflicts whereever this method is used,
either as hash stored in the database or as id decorator in DOM.

Due to the issues this method brings, it is marked as deprecated now.

Review

  • Code review CR +2 Done
    • Benni Mack +2
    • Oli Bartsch +1
  • Verified V +2 Done
    • Benni Mack +2
    • Oli Bartsch +1
    • core-ci +1 CI

Issues 1

Files 20

Review log 1927

Show 12 earlier messages
  1. Andreas Kienast uploaded patch set 1 08/01/21, 13:49

  2. core-ci voted on patch set 1 V -1 08/01/21, 14:20 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/13963

  1. Andreas Kienast uploaded patch set 2 08/01/21, 14:21

  2. core-ci voted on patch set 2 V +1 08/01/21, 14:33 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/13964

  3. Andreas Kienast uploaded patch set 3 08/01/21, 19:48

  4. core-ci voted on patch set 3 V +1 08/01/21, 19:59 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/13968

  5. Oli Bartsch commented on patch set 3 08/02/21, 13:30

    SlugHelper.php:216 Unresolved

    This might look odd (from an UX perspective). No blocker, just wanted to mention it, as the commit message could be read like "this does not effect any display as the values are only used for DOM ids and database values".

    CreateSiteConfiguration.php:79

    Is there any reason to create a hash of the pageId as this should already be unique? Especially in case this is not unique the md5 will anyways be the same. Also UX is affected here.

    GeneralUtility.php:2346

    This should also be replaced.
  6. Andreas Kienast commented on patch set 3 08/02/21, 13:42

    CreateSiteConfiguration.php:79 Reply Unresolved

    Good point, I'll think about that again. I cannot remember why the shortMD5() was introduced in the first place.

    GeneralUtility.php:2346 Reply Unresolved

    Good catch!
  7. Andreas Kienast uploaded patch set 4 08/02/21, 14:29

  8. core-ci voted on patch set 4 V +1 08/02/21, 14:41 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/14000

  9. Georg Ringer commented on patch set 4 V +1 CR +1 08/02/21, 17:52

    Deprecation-94684-GeneralUtilityShortMD5.rst:39 Unresolved

    I would also give this additional possbility, just because we can be nice ;) ... or use :php:`substr(md5($string), 0, 10)` to reduce the size,
  10. Andreas Kienast uploaded patch set 5 08/03/21, 06:09

  11. core-ci voted on patch set 5 V +1 08/03/21, 06:35 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/14032

  12. Wouter Wolters voted on patch set 5 CR +1 08/03/21, 20:00

  13. Jörg Bösche voted on patch set 5 CR +1 08/06/21, 07:38

  14. Andreas Kienast uploaded patch set 6 08/10/21, 07:03

  15. core-ci voted on patch set 6 V -1 08/10/21, 07:23 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/14431

  16. Andreas Kienast uploaded patch set 7 08/10/21, 07:34

  17. core-ci voted on patch set 7 V +1 08/10/21, 07:43 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/14437

  18. Oli Bartsch commented on patch set 7 V +1 CR +1 08/10/21, 08:10

    Clipboard.php:532 Unresolved

    Not that important, but this will make the current clipboard state of users invalid.
  19. Andreas Kienast uploaded patch set 8 08/12/21, 09:15

  20. core-ci voted on patch set 8 V +1 08/12/21, 09:29 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/14662

  21. Oli Bartsch voted on patch set 8 V +1 CR +1 08/12/21, 09:33

  22. Benni Mack voted on patch set 8 V +2 CR +2 08/12/21, 09:34

  23. Benni Mack merged patch set 9 08/12/21, 09:34

  24. Benni Mack commented on patch set 9 08/12/21, 10:38

    AbstractTask.php:105 Unresolved

    I think we should trim this to also contain 10 lines. One of my existing installations now broke after logging in again.
  25. Benni Mack commented on patch set 9 08/12/21, 10:42