Skip to content

fix(browser): stop reading request bodies Chromium did not capture inline - #495

Merged
Hona merged 1 commit into
devfrom
browser-tools/remove-postdata-fallback
Nov 21, 2026
Merged

Hona merged 1 commit into
devfrom
browser-tools/remove-postdata-fallback

Conversation

@Hona

@Hona Hona commented Nov 21, 2026

Copy link
Copy Markdown
Member

READER-10 critical 4 (notes\review-rd-tools.md): #446 added a Network.getRequestPostData fallback to browser.network.get({ includeBody: true }), so a form body Chromium did not capture inline (a password, a one-time code, a card number, a token) reached the model in full. Official never calls it (packages/gui-plugins/src/browser/diagnostics.ts:268-297, diagnostics-machine.ts:289-300 at db2d889c).

  • Removed the fallback: a request body is only what Chromium captured inline under maxPostDataSize: 20_000 (same as official diagnostics.ts:236); otherwise unavailable / notCaptured.
  • Response bodies: official's MIME rule exactly (diagnostics-machine.ts:312); notCaptured for a hop with no response or a WebSocket (:308-309); includeResponseBody defaults to includeBody (diagnostics.ts:287).

Parity note: official returns an inline-captured request body and a textual response body to the model without redaction (diagnostics-machine.ts:292-297, diagnostics.ts:276-284), capped at maxBodyChars (default and max 20,000). Rune now does the same; recorded in notes\upstream-sync\ours.md as parity, not a difference.

A removal of dangerous behaviour: merged on build, read after (orchestrator).

…line

network.get no longer calls Network.getRequestPostData: a request body is only what Chromium captured inline under maxPostDataSize 20,000, as official (diagnostics-machine.ts:289-300; official never calls getRequestPostData). Response bodies follow official's MIME rule exactly (diagnostics-machine.ts:312), report notCaptured for hops with no response or a WebSocket (:308-309), and includeResponseBody defaults to includeBody (diagnostics.ts:287).
@Hona
Hona merged commit 0612c4c into dev Nov 21, 2026
6 checks passed
@Hona
Hona deleted the browser-tools/remove-postdata-fallback branch November 21, 2026 09:45
@github-actions

github-actions Bot commented Nov 21, 2026 •

Copy link
Copy Markdown

PR test build retired — merged into dev. Install or auto-update OpenCode (Rune) from https://anoma.ly/release/opencode/desktop-rune/dev/macos-arm64-dmg.

Hona added a commit that referenced this pull request Nov 21, 2026
…ist, preview URLs shown as their page, merged headers bounded (#548)

* fix(browser): diagnostics parity: no getRequestPostData on the allowlist, preview URLs shown as their page, merged headers bounded

READER-10's three parity diffs on #495: Network.getRequestPostData leaves the typed-CDP allowlist (nothing calls it since #495); on a preview tab the engine maps internal oc-preview:// addresses in every forwarded event to the page's display URL (official diagnostics.ts:43,47,157); ExtraInfo headers merge under the stored ones and the merged set keeps the 100-header / 16,000-character bound (official trimHeaders on the merge, diagnostics-machine.ts:148,165,182). Engine change: dev ENGINE_REVISION 6, published 5: no bump.

* fix(browser): keep early ExtraInfo and end a redirected hop

READER-10 should-fix 6, last part: ExtraInfo that arrives before its requestWillBeSent is held (128 requests, 16 events each, as official MAX_STASHED_CHAINS / MAX_WIRE_QUEUE) and replayed when the request comes; a redirect, which reuses the request ID, completes the earlier hop with the redirect's status and headers instead of leaving it pending (official transitionChain 'redirected').
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