From 5a585cb01d73e968ace0dc8f017fe65f5c61a6f0 Mon Sep 17 00:00:00 2001 From: ReAnzu Date: Wed, 7 Mar 2018 19:55:38 -0600 Subject: [PATCH] Missed name shadowing issue --- server/szurubooru/func/users.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/server/szurubooru/func/users.py b/server/szurubooru/func/users.py index 5fe9f2ca..012debca 100644 --- a/server/szurubooru/func/users.py +++ b/server/szurubooru/func/users.py @@ -244,8 +244,7 @@ def update_user_password(user: model.User, password: str) -> None: 'Password must satisfy regex %r.' % password_regex) user.password_salt = auth.create_password() password_hash, revision = auth.get_password_hash( - user.password_salt, - password) + user.password_salt, password) user.password_hash = password_hash user.password_revision = revision @@ -312,7 +311,8 @@ def reset_user_password(user: model.User) -> str: assert user password = auth.create_password() user.password_salt = auth.create_password() - hash, revision = auth.get_password_hash(user.password_salt, password) - user.password_hash = hash + password_hash, revision = auth.get_password_hash( + user.password_salt, password) + user.password_hash = password_hash user.password_revision = revision return password