Skip to content

fix(screenshot): bound base64 decoding memory - #242

Merged
bitxeno merged 2 commits into
bitxeno:masterfrom
YellowNest:fix/screenshot-download-decode-limit
Oct 29, 2026
Merged

bitxeno merged 2 commits into
bitxeno:masterfrom
YellowNest:fix/screenshot-download-decode-limit

Conversation

@YellowNest

@YellowNest YellowNest commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Problem

Large screenshot uploads were decoded in full before enforcing the existing 8 MiB limit.

Fix

Bound base64 decoding to 8 MiB plus one byte while preserving valid screenshots and line-wrapped base64.

Verification

  • GitHub CI passed: frontend tests, build and golangci-lint.
  • Isolated regression tests passed with the Go race detector.
  • Oversized input, exact size limit and line wrapping are covered.
  • Full Go unit test suite has not been run.

@YellowNest
YellowNest marked this pull request as ready for review October 28, 2026 23:55
@bitxeno
bitxeno merged commit 32c1a90 into bitxeno:master Oct 29, 2026
1 check passed
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.

2 participants

⌂ 换网址