Skip to content

Commit

Permalink
[MIG] auth_admin_passkey: Migration to 18.0
Browse files Browse the repository at this point in the history
  • Loading branch information
moncefarajdal authored Oct 15, 2024
1 parent 2915bb0 commit 2448b94
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion auth_admin_passkey/models/res_users.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,10 @@ def _check_credentials(self, password, env):
)
if password_encrypted and password:
# password stored on config is encrypted
password = hashlib.sha512(password.encode()).hexdigest()
if isinstance(password, str):
password = hashlib.sha512(password.encode()).hexdigest()
else:
raise ValueError("Password must be a string")

if password and file_password == password:
if request and hasattr(request, "session"):
Expand Down

0 comments on commit 2448b94

Please sign in to comment.