Skip to content

fix(app): encode server credentials as UTF-8 - #46225

Open
sdivyanshu90 wants to merge 1 commit into
anomalyco:devfrom
sdivyanshu90:unicode-server-auth
Open

fix(app): encode server credentials as UTF-8#46225
sdivyanshu90 wants to merge 1 commit into
anomalyco:devfrom
sdivyanshu90:unicode-server-auth

Conversation

@sdivyanshu90

Copy link
Copy Markdown

Issue for this PR

Closes #46224

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

The app passed username:password directly to btoa(), which either encoded non-ASCII credentials with the wrong bytes or threw InvalidCharacterError. This change converts the credential string to UTF-8 bytes before standard Base64 encoding, matching the server decoder. Regression tests cover both Latin-1-range and multibyte credentials while preserving the existing ASCII result.

How did you verify your code works?

From packages/app at reduced process priority:

  • bun test src/utils/server.test.ts src/utils/server-health.test.ts src/utils/server-protocol.test.ts src/utils/server-compat.test.ts src/utils/terminal-websocket-url.test.ts — 30 tests passed
  • bun typecheck — passed

Screenshots / recordings

Not applicable. This changes authentication encoding logic without changing the rendered UI.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Web and desktop clients cannot authenticate with Unicode server credentials

1 participant