Repository navigation
Conversation
|
Codex review: needs maintainer review before merge. Reviewed July 28, 2026, 3:32 AM ET / 07:32 UTC. ClawSweeper reviewWhat this changesThe branch validates browser-proxy file base64 before decoding or persisting it, with a regression test for malformed payloads. Merge readinessKeep this PR open for normal maintainer merge review. The focused patch replaces Node’s permissive base64 decode with the shared plugin-SDK validator, retains both pre-decode and post-decode byte-limit checks, and includes convincing live module output showing malformed input is rejected without creating another saved file. Priority: P2 Review scores
Verification
How this fits togetherThe Browser plugin receives file payloads from a node-hosted browser proxy and persists them as local media before rewriting returned paths. This validation step sits between proxy output and the local media store so corrupted payloads do not become saved screenshots or downloads. flowchart LR
A[Node-hosted browser proxy] --> B[Returned file payloads]
B --> C[Browser proxy file persistence]
C --> D[Canonical base64 validation]
D --> E[Byte-limit checks]
E --> F[Local browser media files]
F --> G[Rewritten result paths]
Before merge
Agent review detailsSecurityNone. PR surfaceSource +12, Tests +19. Total +31 across 2 files. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Merge the narrow validation change once the remaining required checks complete successfully, keeping browser-proxy decoding on the shared media-runtime contract. Do we have a high-confidence way to reproduce the issue? Yes, from source and the supplied live module transcript: a malformed base64 string reaches the browser-proxy persistence path, while the patch’s negative control shows rejection before another file is written. The pre-fix behavior was not independently run in this read-only review. Is this the best way to solve the issue? Yes. Reusing the shared media-runtime canonicalizer at the plugin SDK boundary is narrower and more maintainable than adding a browser-specific base64 parser, while retaining the existing size-limit protections. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 0216fbd4e491. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
…5-browser-proxy-base64-115045
|
Thanks @sunlit-deng for the focused fix and for correctly reusing the existing media-runtime base64 contract. I independently reviewed and reproduced this on your original head and found one important compatibility case: I have fast-forwarded this original PR branch, preserving your original commit and authorship, to Verification on the exact refreshed head:
Hosted CI for the new head is running; I will wait for the exact head to turn green before proceeding. Thank you again for the original report and implementation. |
|
Merged via squash.
|
* origin/main: fix(browser): reject malformed proxy file base64 (openclaw#115045) fix(sandbox): repair workspace state without crossing agent owners (openclaw#115784)
* fix(browser): reject malformed proxy file base64 * fix(browser): preserve empty proxy downloads --------- Co-authored-by: Peter Steinberger <[email protected]>
* origin/main: fix(browser): reject malformed proxy file base64 (openclaw#115045) fix(sandbox): repair workspace state without crossing agent owners (openclaw#115784)
What Problem This Solves
Fixes an issue where Browser proxy users could receive corrupted saved files when the node-hosted browser proxy returned malformed base64 file data.
Why This Change Was Made
Browser proxy files now use the shared media-runtime base64 validation before decoding, while keeping the existing per-file and aggregate byte limits. Invalid file payloads are rejected before any additional media file is persisted.
User Impact
Browser screenshots and downloads saved through the proxy no longer silently accept malformed base64 payloads as corrupted files.
Evidence
pnpm exec tsx proof-live.tsimportsextensions/browser/src/browser/proxy-files.ts, saves a valid proxy file, rejects a malformed negative control, and leaves the persisted file count unchanged after rejection.node scripts/run-vitest.mjs run extensions/browser/src/browser/proxy-files.test.tsproof-live.ts
AI-assisted: built with Codex