Skip to content

fix(browser-engine): no pop-up or native menu off the agent's input - #496

Merged
Hona merged 1 commit into
devfrom
browser-tools/agent-input-no-popup-credit
Nov 21, 2026
Merged

Hona merged 1 commit into
devfrom
browser-tools/agent-input-no-popup-credit

Conversation

@Hona

@Hona Hona commented Nov 21, 2026

Copy link
Copy Markdown
Member

READER-10 critical 7 (notes\review-rd-tools.md).

  • Pop-ups: every agent Input.* armed popup_credit (engine.rs:612,731), so a hostile page's mousedown/keydown handler could open a new tab to any URL off the agent's input, past browser.tabs.open's server deny rules, with the person's cookies. Agent input (CdpCall, TypedCdpCall, DropFiles) now clears the credit instead; only the person's press or key arms it. Official: the agent's input is never the person's, so a link it opens stays a blocked pop-up (packages/gui-plugins/src/browser/window-open.ts:78-80,106 at db2d889c).
  • Native context menu: an agent right-click opened the app's own menu over the person's window and took keyboard focus. Agent input now sets menu_suppressed; run_context_menu cancels while it is set; the person's next press or key clears it (official chromium.ts:2500-2501, nativeMenu = false on agent input, re-armed by user input).

ENGINE_REVISION: dev is 6, published 5: no bump. A removal of dangerous behaviour: merged on build, read after (orchestrator).

Agent Input.* (CdpCall, TypedCdpCall, DropFiles) no longer arms the one-pop-up credit and clears any the person left, so a hostile page's handler cannot open tabs off the agent's input past tabs.open's deny rules (official window-open.ts:78-80,106). It also suppresses the native context menu until the person's own press or key (official chromium.ts:2500-2501, nativeMenu). No ENGINE_REVISION bump: dev is 6, published 5.
@Hona
Hona merged commit ab9627c into dev Nov 21, 2026
@Hona
Hona deleted the browser-tools/agent-input-no-popup-credit branch November 21, 2026 09:50
Hona added a commit that referenced this pull request Nov 21, 2026
Hona added a commit that referenced this pull request Nov 21, 2026
…ut, exact detached_ref, upload cap counts the upload, agent commands clear the pop-up credit (#553)

From READER-10's reads of #500, #507 and #496: our helpers' fixed messages pass verbatim only where those helpers run (input.rs); browser.detached_ref matches only our throw (message then newline, as official chromium.ts); the per-tab staged-upload cap counts the incoming upload's bytes; every agent CDP command and upload clears a pop-up credit a person's earlier click left (Input.* also suppresses the native menu). Engine: dev ENGINE_REVISION 6, published 5: no bump.
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