From 6f8840daa173077ec5ff82552d17ff24b0b442a4 Mon Sep 17 00:00:00 2001 From: Krrish Dholakia Date: Tue, 20 Aug 2024 08:56:20 -0700 Subject: [PATCH] fix(proxy_server.py): fix invalid login message to not show passed in pwd Closes https://github.com/BerriAI/litellm/issues/5290 --- litellm/proxy/proxy_server.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/litellm/proxy/proxy_server.py b/litellm/proxy/proxy_server.py index 5e3a56a8cf6..12069d5e855 100644 --- a/litellm/proxy/proxy_server.py +++ b/litellm/proxy/proxy_server.py @@ -8066,14 +8066,14 @@ async def login(request: Request): return redirect_response else: raise ProxyException( - message=f"Invalid credentials used to access UI. Passed in username: {username}, passed in password: {password}.\nNot valid credentials for {username}", + message=f"Invalid credentials used to access UI.\nNot valid credentials for {username}", type=ProxyErrorTypes.auth_error, param="invalid_credentials", code=status.HTTP_401_UNAUTHORIZED, ) else: raise ProxyException( - message=f"Invalid credentials used to access UI. Passed in username: {username}, passed in password: {password}.\nCheck 'UI_USERNAME', 'UI_PASSWORD' in .env file", + message="Invalid credentials used to access UI.\nCheck 'UI_USERNAME', 'UI_PASSWORD' in .env file", type=ProxyErrorTypes.auth_error, param="invalid_credentials", code=status.HTTP_401_UNAUTHORIZED,