This commit is contained in:
Timothy Jaeryang Baek committed 2026-05-21 16:56:56 +04:00
1 parent b94245d2ee
commit 470a074cd1
6 files changed
+58 -101

No files matched your search

+3 -2
View File
@@ -286,8 +286,9 @@ async def update_password(
session_user=Depends(get_current_user),
db: AsyncSession = Depends(get_async_session),
):
# Trusted-header auth mode delegates passwords to the reverse proxy
if WEBUI_AUTH_TRUSTED_EMAIL_HEADER:
raise HTTPException(400, detail=ERROR_MESSAGES.ACTION_PROHIBITED)
raise HTTPException(status.HTTP_400_BAD_REQUEST, detail=ERROR_MESSAGES.ACTION_PROHIBITED)
if session_user:
user = await Auths.authenticate_user(
session_user.email,
@@ -578,7 +579,7 @@ async def signin(
if WEBUI_AUTH_TRUSTED_EMAIL_HEADER:
if WEBUI_AUTH_TRUSTED_EMAIL_HEADER not in request.headers:
raise HTTPException(400, detail=ERROR_MESSAGES.INVALID_TRUSTED_HEADER)
raise HTTPException(status.HTTP_400_BAD_REQUEST, detail=ERROR_MESSAGES.INVALID_TRUSTED_HEADER)
email = request.headers[WEBUI_AUTH_TRUSTED_EMAIL_HEADER].lower()
name = email