mirror of
https://github.com/csd4ni3l/grass_touching_captcha.git
synced 2026-01-01 12:33:45 +01:00
fix salt and password not being decoded when changing password
This commit is contained in:
2
main.py
2
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()
|
||||
|
||||
Reference in New Issue
Block a user