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:
parent
41b38ab6e7
commit
444aceefa5
1 changed files with 1 additions and 1 deletions
|
|
@ -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):
|
||||
|
|
|
|||
Loading…
Reference in a new issue