fix(opencode): decode uppercase base64 markers by sdivyanshu90 · Pull Request #47585 · anomalyco/opencode · GitHub
Skip to content

fix(opencode): decode uppercase base64 markers - #47585

Open
sdivyanshu90 wants to merge 1 commit into
anomalyco:devfrom
sdivyanshu90:uppercase-base64
Open

fix(opencode): decode uppercase base64 markers#47585
sdivyanshu90 wants to merge 1 commit into
anomalyco:devfrom
sdivyanshu90:uppercase-base64

Conversation

@sdivyanshu90

Copy link
Copy Markdown

Issue for this PR

Closes #47583

Type of change

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

What does this PR do?

The text data-URL decoder only recognized the lowercase substring ;base64, so uppercase markers exposed the encoded payload as text. This change checks semicolon-delimited metadata for an exact base64 token case-insensitively, matching the Fetch data-URL processor and avoiding prefix matches such as base64x. A regression test covers the uppercase marker.

How did you verify your code works?

From packages/opencode at reduced process priority:

  • bun test --timeout 30000 test/util/data-url.test.ts — 3 tests passed
  • bun typecheck — started but stopped locally after several minutes to avoid resource contention; no diagnostic was emitted before cancellation

Screenshots / recordings

Not applicable. This changes data-URL decoding 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.

Text data URLs with uppercase BASE64 markers expose encoded payloads

1 participant