Fix tokens using too-random of a value

update-jquery-3.5.0
Kevin Chung 2020-04-29 22:45:11 -04:00
parent a9aa80af89
commit 740ea36f7a
1 changed files with 1 additions and 1 deletions

View File

@ -27,7 +27,7 @@ def generate_user_token(user, expiration=None):
temp_token = UserTokens.query.filter_by(value=value).first()
token = UserTokens(
user_id=user.id, expiration=expiration, value=hexencode(os.urandom(32))
user_id=user.id, expiration=expiration, value=value
)
db.session.add(token)
db.session.commit()