Repository navigation
fix(app): encode server credentials as UTF-8 - #46225
sdivyanshu90 wants to merge 1 commit into
Conversation
|
Hi @Brendonovich, @Hona, could you please review this PR when you have a chance? |
|
Hi @Hona @Brendonovich, could you please review this PR whenever you have some time. Thanks! |
|
Focused validation looks good on head 7adf3a3. "bun test src/utils/server.test.ts" The regression covers both sides of the compatibility boundary: ASCII credentials keep their existing encoding, while multibyte credentials round-trip through Basic auth correctly, including a 用户 / 秘密🔐 case. That is a better invariant than testing only one accented password, because it verifies UTF-8 encoding and the existing decode path agree. One caveat: the exact-head GitHub workflows currently show action_required rather than green, so I'm treating this as independent focused evidence, not CI qualification. |
|
Automated PR Cleanup Thank you for contributing to opencode. Due to the high volume of PRs from users and AI agents, we periodically close older PRs using automated criteria so maintainers can focus review time on the most active and community-supported contributions. This PR was closed because it matched the following cleanup criteria:
PRs created within the last month are not affected by this cleanup. If you believe this PR was closed incorrectly, or if you are still actively working on it, please leave a comment explaining why it should be reopened. A maintainer can review and reopen it if appropriate. Thanks again for taking the time to contribute. |
|
Hi @Hona, could you please reopen and review this PR when you have time? Thanks! |
Issue for this PR
Closes #46224
Type of change
What does this PR do?
The app passed
username:passworddirectly tobtoa(), which either encoded non-ASCII credentials with the wrong bytes or threwInvalidCharacterError. 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/appat 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 passedbun typecheck— passedScreenshots / recordings
Not applicable. This changes authentication encoding logic without changing the rendered UI.
Checklist