Review 10.4 Merged

65575[BUGFIX] Ensure uniqid calls use more_entropy

Christian Kuhn CR +2 V +2 Normal +38 −22 updated 09/04/20, 09:50

Commit message

Precision of `uniqid()` on Windows systems without passing
`$more_entropy=true` has only single-second-resolution which will
lead to non-unique ids on subsequent calls.

In order to mitigate this issue TYPO3 provides the function
`StringUtility::getUniqueId($prefix = '')` which calls
`uniqid()` with parameter `$more_entropy` always set to true.

Using `uniqid()`, especially with `$more_entropy` set to true,
is quite slow, but for the purposes TYPO3 is using it
(i.e. creating unique field names for backend forms, path
identifiers in some modules etc.) it is good enough and
another solution would not provide any measurable benefit.

Review

  • Code review CR +2 Done
    • Christian Kuhn +2
    • Tizian Schmidlin +1
  • Verified V +2 Done
    • Christian Kuhn +2
    • Tizian Schmidlin +1
    • TYPO3com +1 CI

Issues 1

Files 18

Review log 45

  1. Christian Kuhn uploaded patch set 1 09/04/20, 09:10

  2. TYPO3com voted on patch set 1 V +1 09/04/20, 09:22 Completed build in 12m 09s on Fri, 4 Sep, 09:22 AM Test Summary: 74169 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC104-327

  3. Tizian Schmidlin voted on patch set 1 V +1 CR +1 09/04/20, 09:35

  4. Christian Kuhn voted on patch set 1 V +2 CR +2 09/04/20, 09:49

  5. Christian Kuhn merged patch set 2 09/04/20, 09:50