mirror of https://github.com/JohnHammond/CTFd.git
Merge remote-tracking branch 'origin/2.4.0-dev' into is_admin_func_cache_hit
commit
e99f4f11a5
|
@ -27,7 +27,7 @@ def generate_user_token(user, expiration=None):
|
||||||
temp_token = UserTokens.query.filter_by(value=value).first()
|
temp_token = UserTokens.query.filter_by(value=value).first()
|
||||||
|
|
||||||
token = UserTokens(
|
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.add(token)
|
||||||
db.session.commit()
|
db.session.commit()
|
||||||
|
|
Loading…
Reference in New Issue