Review main Merged

93998[TASK] Use random_bytes() in StringUtility::getUniqueId()

TYPO3com CR +2 V +2 Easy +13 −7 updated 10/07/26, 20:05

Commit message

StringUtility::getUniqueId() now generates its id from 12 random
bytes instead of uniqid(), which is based on the current time.
The result is still a hexadecimal string that can be used in
HTML attributes.

The styleguide ViewHelpers calling uniqid() directly now use
StringUtility::getUniqueId() as well.

Review

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

Issues 1

Files 5

Review log 1115

  1. TYPO3com uploaded patch set 1 05/05/26, 22:29

  2. core-ci voted on patch set 1 V +1 05/05/26, 22:40 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/101578

  3. Oliver Hader commented on patch set 1 05/06/26, 12:36

    Code-wise the change is fine and good. However, the description is misleading and might suggest that something was insecure or a vulnerability - which is not the case, since the use-cases do not require cryptographically secure random values. I guess, that we will receive more of these pull-request changing any "insecure" `md5`, `sha1`, `rand_*` usage without considering the corresponding context. Thus: The commit message should be adjusted. Avoid the drama, focus on the facts only.

    StringUtility.php:61

    use `12` bytes

    CodeViewHelper.php:108

    use namespace imports

    ExampleViewHelper.php:111

    use namespace imports
  4. Oliver Hader commented on patch set 1 CR -1 05/06/26, 12:37

    see previous comments
  5. Georg Ringer uploaded patch set 2 CR -1 V +1 10/06/26, 15:55

  6. Georg Ringer commented on patch set 2 10/06/26, 15:56

    StringUtility.php:61 Reply

    Done

    CodeViewHelper.php:108 Reply

    Done

    ExampleViewHelper.php:111 Reply

    Done
  7. core-ci voted on patch set 2 V +1 10/06/26, 16:02 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/110236

  8. Benni Mack commented on patch set 2 CR +1 10/07/26, 12:01

    Reply

    Done
  9. Oliver Klee voted on patch set 2 CR +1 V +1 10/07/26, 12:52

  10. Wouter Wolters voted on patch set 2 CR +1 V +1 10/07/26, 15:30

  11. Wouter Wolters uploaded patch set 3 CR +1 V +1 10/07/26, 19:36

  12. Wouter Wolters voted on patch set 3 CR +1 V +1 10/07/26, 19:36

  13. core-ci voted on patch set 3 V +1 10/07/26, 19:44 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/110394

  14. Benni Mack voted on patch set 3 CR +2 V +2 10/07/26, 20:05

  15. Benni Mack merged patch set 4 10/07/26, 20:05