fix(fastapi): fix SessionID (and ResetKey) generation

Signed-off-by: Kevin Morris <kevr@0cost.org>
This commit is contained in:
Kevin Morris 2021-11-27 20:04:26 -08:00
parent d658627e99
commit 47feb72f48
No known key found for this signature in database
GPG key ID: F7E46DED420788F3
4 changed files with 12 additions and 35 deletions

View file

@ -230,3 +230,7 @@ class User(Base):
def __repr__(self):
return "<User(ID='%s', AccountType='%s', Username='%s')>" % (
self.ID, str(self.AccountType), self.Username)
def generate_unique_resetkey():
return db.make_random_value(User, User.ResetKey, 32)