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

    Imported before Forger kept the single votes, the next import adds them.

  • Verified V +2

    Imported before Forger kept the single votes, the next import adds them.

Issues 1

Files 18