fix salt and password not being decoded when changing password

This commit is contained in:
csd4ni3l
2025-08-15 17:14:45 +02:00
parent 7d7bf75351
commit 2414034cee

View File

@@ -395,7 +395,7 @@ def change_password():
new_salt = bcrypt.gensalt() new_salt = bcrypt.gensalt()
hashed_password = bcrypt.hashpw(new_password.encode(), new_salt) hashed_password = bcrypt.hashpw(new_password.encode(), new_salt)
cur.execute("UPDATE Users SET password = ?, password_salt = ? WHERE username = ?", (hashed_password, new_salt, username)) cur.execute("UPDATE Users SET password = ?, password_salt = ? WHERE username = ?", (hashed_password.decode(), new_salt.decode(), username))
get_db().commit() get_db().commit()
cur.close() cur.close()