From 3a1f4eca4ce11a71fe194bb48e7aa3ec7604d4d9 Mon Sep 17 00:00:00 2001 From: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com> Date: Mon, 23 Nov 2026 13:37:29 -0600 Subject: [PATCH] keep password hashing on the event loop --- frigate/api/auth.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/frigate/api/auth.py b/frigate/api/auth.py index 82d598080f..a925e008cf 100644 --- a/frigate/api/auth.py +++ b/frigate/api/auth.py @@ -1,6 +1,5 @@ """Auth apis.""" -import asyncio import base64 import hashlib import ipaddress @@ -1139,9 +1138,7 @@ async def update_password( content={"message": "Current password is required"}, status_code=400, ) - if not await asyncio.to_thread( - verify_password, body.old_password, user.password_hash - ): + if not verify_password(body.old_password, user.password_hash): return JSONResponse( content={"message": "Current password is incorrect"}, status_code=401, @@ -1155,9 +1152,7 @@ async def update_password( status_code=400, ) - password_hash = await asyncio.to_thread( - hash_password, body.password, iterations=HASH_ITERATIONS - ) + password_hash = hash_password(body.password, iterations=HASH_ITERATIONS) User.update( { User.password_hash: password_hash,