1
0
Fork 0

logs: actually use SystemRandom source for generating a random string

The returned string was only pseudo random. It is only used for the
log_capture_start() mechanism at the moment. Therefore an attacker might
be able to guess the tokens of other users. Since this data it publicly
available anyways it should not be a big issue, however.
This commit is contained in:
Matthias Gerstner 2018-12-11 11:06:01 +01:00
parent 41b38ab6e7
commit 444aceefa5
No known key found for this signature in database
GPG key ID: 14C405C971923553

View file

@ -30,7 +30,7 @@ def _random_string(length):
chars = string.ascii_letters + string.digits
res = ""
for i in range(length):
res += random.choice(chars)
res += r.choice(chars)
return res
def log_capture_start(log_level):