mirror of
https://github.com/open-webui/open-webui.git
synced 2026-08-28 05:27:35 +00:00
fix(auth): handle unparseable stored password hash gracefully in authenticate_user (#29092)
This commit is contained in:
parent
d3e8bf3405
commit
9f2df770c1
1 changed files with 9 additions and 2 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue