mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Fixed Securtiy Hotspot reported by SonarQube.
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
|
||||
from flask import session
|
||||
from threading import Lock
|
||||
import random
|
||||
import secrets
|
||||
|
||||
debugger_sessions_lock = Lock()
|
||||
|
||||
@@ -17,7 +17,7 @@ debugger_sessions_lock = Lock()
|
||||
class DebuggerInstance(object):
|
||||
def __init__(self, trans_id=None):
|
||||
if trans_id is None:
|
||||
self._trans_id = str(random.randint(1, 9999999))
|
||||
self._trans_id = str(secrets.choice(range(1, 9999999)))
|
||||
else:
|
||||
self._trans_id = str(trans_id)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user