Use secrets
instead of random
to generate access token
This commit is contained in:
parent
c6b518bd15
commit
f308bca1fb
@ -1,4 +1,4 @@
|
||||
import random
|
||||
import secrets
|
||||
import string
|
||||
|
||||
from flask import Blueprint, request, redirect, render_template, session
|
||||
@ -6,7 +6,7 @@ from flask import Blueprint, request, redirect, render_template, session
|
||||
bp = Blueprint("auth", __name__, url_prefix="/auth")
|
||||
|
||||
|
||||
ACCESS_TOKEN = "".join(random.choice(string.ascii_lowercase) for i in range(64))
|
||||
ACCESS_TOKEN = "".join(secrets.choice(string.ascii_lowercase) for i in range(64))
|
||||
|
||||
|
||||
ALLOWED_PATHS = [
|
||||
|
Loading…
x
Reference in New Issue
Block a user