From aa0db1ff5b21e618d74c7a337aaa03a25e6f9098 Mon Sep 17 00:00:00 2001 From: Daniel Han Date: Wed, 3 Jun 2026 06:10:23 -0700 Subject: [PATCH] fix(studio): don't double-quote the reset-password hint for spaced paths (#5975) Addresses review feedback on #5971. _reset_password_command() already shell-quotes the launcher path on POSIX (shlex.quote), so wrapping the result in another pair of single quotes in the error string produced a mangled hint for installs / home dirs containing spaces, e.g. Run ''/tmp/Unsloth Studio/.../unsloth' studio reset-password' in your terminal which a shell mis-parses. Drop the outer quotes and put the command at the end of the message so it is unambiguous and copy-pasteable in every case: Incorrect password. To reset it, run this in your terminal: Co-authored-by: Claude Opus 4.8 --- studio/backend/routes/auth.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/studio/backend/routes/auth.py b/studio/backend/routes/auth.py index ef01bcc9a9..23112ca2f8 100644 --- a/studio/backend/routes/auth.py +++ b/studio/backend/routes/auth.py @@ -260,7 +260,7 @@ async def login(payload: AuthLoginRequest, request: Request) -> Token: _record_login_failure(unknown_key) raise HTTPException( status_code = status.HTTP_401_UNAUTHORIZED, - detail = f"Incorrect password. Run '{_reset_password_command()}' in your terminal to reset it.", + detail = f"Incorrect password. To reset it, run this in your terminal: {_reset_password_command()}", ) salt, pwd_hash, _jwt_secret, must_change_password = record @@ -268,7 +268,7 @@ async def login(payload: AuthLoginRequest, request: Request) -> Token: _record_login_failure(key) raise HTTPException( status_code = status.HTTP_401_UNAUTHORIZED, - detail = f"Incorrect password. Run '{_reset_password_command()}' in your terminal to reset it.", + detail = f"Incorrect password. To reset it, run this in your terminal: {_reset_password_command()}", ) _clear_login_bucket(key)