From 2414034cee3132611292345b94abd78960004da5 Mon Sep 17 00:00:00 2001 From: csd4ni3l Date: Fri, 15 Aug 2025 17:14:45 +0200 Subject: [PATCH] fix salt and password not being decoded when changing password --- main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.py b/main.py index 0211315..a57ce25 100644 --- a/main.py +++ b/main.py @@ -395,7 +395,7 @@ def change_password(): new_salt = bcrypt.gensalt() 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() cur.close()