synapse-product/synapse/util
Dan Callahan 498084228b
Use Python's secrets module instead of random (#9984)
Functionally identical, but more obviously cryptographically secure.
...Explicit is better than implicit?

Avoids needing to know that SystemRandom() implies a CSPRNG, and
complies with the big scary red box on the documentation for random:

> Warning:
>   The pseudo-random generators of this module should not be used for
>   security purposes. For security or cryptographic uses, see the
>   secrets module.

https://docs.python.org/3/library/random.html

Signed-off-by: Dan Callahan <danc@element.io>
2021-05-14 10:58:46 +01:00
..
caches Optionally track memory usage of each LruCache (#9881) 2021-05-05 16:54:36 +01:00
__init__.py Merge pull request from GHSA-x345-32rc-8h85 2021-05-11 11:47:23 +02:00
async_helpers.py Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01:00
daemonize.py Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01:00
distributor.py Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01:00
file_consumer.py Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01:00
frozenutils.py Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01:00
hash.py Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01:00
httpresourcetree.py Replace instance variations of homeserver with correct case/spacing 2019-11-12 13:08:12 +00:00
iterutils.py Remove synapse.types.Collection (#9856) 2021-04-22 16:43:50 +01:00
jsonobject.py Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01:00
logcontext.py Improve the backwards compatibility re-exports of synapse.logging.context (#5617) 2019-07-05 02:32:02 +10:00
logformatter.py Improve the backwards compatibility re-exports of synapse.logging.context (#5617) 2019-07-05 02:32:02 +10:00
macaroons.py Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01:00
manhole.py Simplify super() calls to Python 3 syntax. (#8344) 2020-09-18 09:56:44 -04:00
metrics.py Merge branch 'master' into develop 2021-04-20 14:55:16 +01:00
module_loader.py Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01:00
msisdn.py Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01:00
patch_inline_callbacks.py Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01:00
ratelimitutils.py Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01:00
retryutils.py Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01:00
rlimit.py Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01:00
stringutils.py Use Python's secrets module instead of random (#9984) 2021-05-14 10:58:46 +01:00
templates.py Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01:00
threepids.py Limit length of accepted email addresses (#9855) 2021-04-22 17:49:11 +01:00
versionstring.py Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01:00
wheel_timer.py Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01:00