From 9f2df770c1ccb019d51ff458c9ba2de2fef2625d Mon Sep 17 00:00:00 2001 From: teddiesloco Date: Thu, 27 Aug 2026 18:53:20 +0700 Subject: [PATCH] fix(auth): handle unparseable stored password hash gracefully in authenticate_user (#29092) --- backend/open_webui/models/auths.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/backend/open_webui/models/auths.py b/backend/open_webui/models/auths.py index 629c5eb6c5..4d14fe6126 100644 --- a/backend/open_webui/models/auths.py +++ b/backend/open_webui/models/auths.py @@ -157,9 +157,16 @@ class AuthsTable: async with get_async_db_context(db) as session: credential = await session.get(Auth, resolved.id) if not credential or not credential.active: - await verify_password(PLACEHOLDER_HASH) + try: + await verify_password(PLACEHOLDER_HASH) + except Exception: + pass return - if not await verify_password(credential.password): + try: + if not await verify_password(credential.password): + return + except Exception: + log.warning('Unparseable stored password hash for user: %s', email) return return resolved