Skip to content

Commit 2a0455d

Browse files
committed
Fix same bug when manually changing password
1 parent 91bf379 commit 2a0455d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

backend/src/admin/auth/user.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ def change_password(self, email: str, new_password: str) -> User | None:
149149
salt = bcrypt.gensalt()
150150
pwd = new_password.encode()
151151

152-
hashed_pwd = bcrypt.hashpw(pwd, salt)
152+
hashed_pwd = bcrypt.hashpw(pwd, salt).decode("utf-8")
153153

154154
updated_user = self.database_manager.query(
155155
"""

0 commit comments

Comments
 (0)