gristlabs_grist-core/sandbox/grist/functions
Alex Hall 31f54065f5 (core) Use standard library uuid.uuidv4 when possible for better randomness
Summary: Using the `random` module in the Grist `UUID()` function is not cryptographically secure, and is only necessary for the old pynbox (Python 2) sandbox which doesn't support `os.urandom`. This diff uses the `uuid.uuidv4()` function from the Python standard library when possible, which is more secure, only falling back to the old implementation when necessary.

Test Plan: Added Python unit tests to check both implementations.

Reviewers: dsagal

Subscribers: paulfitz, dsagal

Differential Revision: https://phab.getgrist.com/D3578
2022-08-12 16:45:11 +02:00
..
__init__.py
date.py (core) Update the current time in formulas automatically every hour 2022-04-28 21:07:40 +02:00
info.py (core) External requests 2022-06-17 21:53:20 +02:00
logical.py
lookup.py (core) Add a row to summary tables grouped by list column(s) corresponding to empty lists 2022-06-09 23:38:14 +02:00
math.py (core) Use standard library uuid.uuidv4 when possible for better randomness 2022-08-12 16:45:11 +02:00
schedule.py
stats.py (core) Allow using MIN and MAX functions with dates/datetimes 2022-08-09 13:34:22 +02:00
test_schedule.py
text.py
unimplemented.py