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 (core) Simple Python 3 compatibility changes 2021-06-22 17:13:17 +02:00
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 (core) Simple Python 3 compatibility changes 2021-06-22 17:13:17 +02:00
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 (core) New type conversion in the backend 2022-02-04 20:28:13 +02:00
stats.py (core) Allow using MIN and MAX functions with dates/datetimes 2022-08-09 13:34:22 +02:00
test_schedule.py (core) Simple Python 3 compatibility changes 2021-06-22 17:13:17 +02:00
text.py Tweaks to documentation comments for user-facing Grist functions (#126) 2022-02-13 00:45:24 -05:00
unimplemented.py (core) Improve suggestions for formula autocomplete 2020-09-12 00:21:29 -04:00