Skip to content

fix: handle unicode redirect payloads in dapp transport#1015

Open
Ysh204 wants to merge 1 commit into
0xsequence:masterfrom
Ysh204:fix/unicode-redirect-payloads
Open

fix: handle unicode redirect payloads in dapp transport#1015
Ysh204 wants to merge 1 commit into
0xsequence:masterfrom
Ysh204:fix/unicode-redirect-payloads

Conversation

@Ysh204

@Ysh204 Ysh204 commented Jun 20, 2026

Copy link
Copy Markdown

Summary

  • Encode redirect request payloads as UTF-8 before base64 encoding
  • Decode redirect response payloads as UTF-8 after base64 decoding
  • Add regression coverage for Unicode redirect request and response payloads

Testing

  • corepack pnpm --filter @0xsequence/dapp-client exec vitest run
  • corepack pnpm --filter @0xsequence/dapp-client lint
  • corepack pnpm --filter @0xsequence/dapp-client typecheck
  • corepack pnpm --filter @0xsequence/dapp-client build

@Ysh204 Ysh204 requested a review from a team June 20, 2026 12:07
@Ysh204 Ysh204 requested a review from a team as a code owner June 20, 2026 12:07

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f8be1eb15e

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread packages/wallet/dapp-client/src/DappTransport.ts Outdated
@Ysh204 Ysh204 force-pushed the fix/unicode-redirect-payloads branch from f8be1eb to 5e93b19 Compare June 20, 2026 12:14
@Ysh204

Ysh204 commented Jun 20, 2026

Copy link
Copy Markdown
Author

Good catch. Updated the decoder to use fatal UTF-8 decoding and fall back to the legacy atob string when the payload is not valid UTF-8. I also added regression coverage for a legacy Latin-1 redirect response payload.

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.

1 participant