Skip to content

Commit

Permalink
encode password before saving
Browse files Browse the repository at this point in the history
  • Loading branch information
winninggodspower committed Jul 8, 2024
1 parent 488fac2 commit 6a5cba5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/auth/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class User(db.Model, UserMixin):

def __init__(self, email, password, is_admin=False):
self.email = email
self.password = bcrypt.generate_password_hash(password)
self.password = bcrypt.generate_password_hash(password.encode('utf8'))
self.created_on = datetime.now()
self.is_admin = is_admin

Expand Down

0 comments on commit 6a5cba5

Please sign in to comment.