Add caution note for random function usage

This commit is contained in:
Andreas Erhard
2025-11-04 11:55:35 +01:00
committed by GitHub
parent 94a363525d
commit 02c5a4b0b6
+5
View File
@@ -10,6 +10,11 @@ parameter type:
* a random integer between the integer parameter (when negative) and 0 (inclusive).
* a random integer between the first integer and the second integer parameter (inclusive).
.. caution::
The ``random`` function does not produce cryptographically secure random numbers.
Do not use them for purposes that require returned values to be unguessable.
.. code-block:: twig
{{ random(['apple', 'orange', 'citrus']) }} {# example output: orange #}