You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(browser): preserve explicit cdpPort when cdpUrl omits port (#83707)
Summary:
- The PR adds raw explicit-port detection for browser CDP URLs, updates profile resolution precedence, adds regression tests, and records the browser fix in the changelog.
- Reproducibility: yes. Source inspection shows current main resolves a portless profile `cdpUrl` through `par ... 443, and overwrites the configured `cdpPort`; the source PR also provides live before/after Chrome output.
Automerge notes:
- PR branch already contained follow-up commit before automerge: fix(browser): encapsulate explicit-port detection in parseBrowserHttpUrl
- PR branch already contained follow-up commit before automerge: fix(browser): preserve explicit cdpPort when cdpUrl omits port
Validation:
- ClawSweeper review passed for head 070c31c.
- Required merge gates passed before the squash merge.
Prepared head SHA: 070c31c
Review: #83707 (comment)
Co-authored-by: Hongwei Ma <[email protected]>
Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com>
Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com>
Approved-by: takhoffman
Co-authored-by: takhoffman <[email protected]>
- Browser: enforce current-tab URL allowlist checks for `/act` evaluate/batch actions and `/highlight` routes while leaving tab-management actions unblocked. (#78523)
50
50
- CI: require real-behavior-proof verdict markers to come from the ClawSweeper GitHub App before accepting exact-head proof. (#83692)
51
+
- Browser: keep a profile `cdpPort` when its `cdpUrl` omits a port, while still letting explicitly written URL ports win. (#82166) Thanks @Marvae.
51
52
- Agents/image generation: allow distinct `image_generate` prompts to start separate session-backed background tasks while same-prompt retries still return the active task status. (#83614) Thanks @Elarwei001.
52
53
- Control UI: stop the chat reading indicator from sticking after an assistant response finishes. (#83515) Thanks @njuboy11.
53
54
- Skills: reject empty or whitespace-only skill names and descriptions during quick validation. (#27061)
Copy file name to clipboardExpand all lines: extensions/browser/src/browser/cdp.helpers.ts
+61-1Lines changed: 61 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -15,6 +15,35 @@ import { withAllowedHostname } from "./ssrf-policy-helpers.js";
15
15
16
16
export{isLoopbackHost};
17
17
18
+
/**
19
+
* Detects whether a raw URL string contains an explicitly written port.
20
+
*
21
+
* WHATWG `URL` normalizes default ports (e.g. `:80` for http, `:443` for
22
+
* https) to an empty `.port` string, making it impossible to distinguish
23
+
* "user wrote :80" from "user omitted the port". This helper inspects the
24
+
* raw string to preserve that intent.
25
+
*
26
+
* Handles IPv6 bracket notation and userinfo (user:pass@host) correctly.
27
+
*/
28
+
functionhasRawExplicitPort(raw: string): boolean{
29
+
// Strip scheme (e.g. "http://") and take only the authority portion
0 commit comments