Skip to content

fix(sandbox): handle bracketed IPv6 hosts in the URL global shim - #10377

Open
kwburns-kong wants to merge 1 commit into
developfrom
fix/sandbox-url-ipv6-host-parsing
Open

fix(sandbox): handle bracketed IPv6 hosts in the URL global shim#10377
kwburns-kong wants to merge 1 commit into
developfrom
fix/sandbox-url-ipv6-host-parsing

Conversation

@kwburns-kong

Copy link
Copy Markdown
Contributor

new URL("http://[::1]:8080/") inside the QuickJS sandbox mis-parsed the bracketed IPv6 host — the authority split on the first colon inside the brackets, producing hostname: "[", port: ":1]:8080".

Fixes the shim to detect a bracketed literal and match WHATWG behavior: brackets stay in hostname/host, hex is lowercased, and an unclosed bracket throws (matching new URL()'s real error). Verified byte-for-byte against real Node's URL for IPv6 (with/without port/auth, default-port stripping, mixed-case hex) and the unclosed-bracket throw case.

new URL("http://[::1]:8080/") mis-split on the first colon inside the
brackets, corrupting hostname/port. Match WHATWG: keep brackets in
hostname/host, lowercase hex, throw on an unclosed bracket.
@kwburns-kong
kwburns-kong requested a review from jackkav August 11, 2026 14:56
@github-actions

Copy link
Copy Markdown

✅ Circular References Report

Generated at: 2026-08-11T15:01:12.190Z
Status: ✅ NO CHANGE

Summary

Metric Base (develop) PR Change
Total Circular References 9 9 0 (0.00%)
Click to view all circular references in PR (9)
insomnia-inso/src/db/models/types.ts -> insomnia-inso/src/db/types.ts
insomnia/src/main/prompt-bridge.ts -> insomnia/src/main/window-utils.ts -> insomnia/src/main/plugin-window.ts
insomnia/src/main/window-utils.ts -> insomnia/src/main/plugin-window.ts
insomnia/src/network/network.ts -> insomnia-scripting-environment/src/objects/index.ts -> insomnia-scripting-environment/src/objects/collection.ts -> insomnia-scripting-environment/src/objects/response.ts
insomnia/src/network/network.ts -> insomnia/src/common/render.ts
insomnia/src/ui/components/settings/import-export.tsx -> insomnia/src/ui/components/modals/export-requests-modal.tsx
insomnia/src/ui/components/tabs/tab-list.tsx -> insomnia/src/ui/components/tabs/tab.tsx
insomnia/src/ui/components/templating/tag-editor-arg-sub-form.tsx -> insomnia/src/ui/components/templating/external-vault/external-vault-form.tsx
insomnia/src/ui/components/viewers/response-viewer.tsx -> insomnia/src/ui/components/viewers/response-multipart-viewer.tsx
Click to view all circular references in base branch (9)
insomnia-inso/src/db/models/types.ts -> insomnia-inso/src/db/types.ts
insomnia/src/main/prompt-bridge.ts -> insomnia/src/main/window-utils.ts -> insomnia/src/main/plugin-window.ts
insomnia/src/main/window-utils.ts -> insomnia/src/main/plugin-window.ts
insomnia/src/network/network.ts -> insomnia-scripting-environment/src/objects/index.ts -> insomnia-scripting-environment/src/objects/collection.ts -> insomnia-scripting-environment/src/objects/response.ts
insomnia/src/network/network.ts -> insomnia/src/common/render.ts
insomnia/src/ui/components/settings/import-export.tsx -> insomnia/src/ui/components/modals/export-requests-modal.tsx
insomnia/src/ui/components/tabs/tab-list.tsx -> insomnia/src/ui/components/tabs/tab.tsx
insomnia/src/ui/components/templating/tag-editor-arg-sub-form.tsx -> insomnia/src/ui/components/templating/external-vault/external-vault-form.tsx
insomnia/src/ui/components/viewers/response-viewer.tsx -> insomnia/src/ui/components/viewers/response-multipart-viewer.tsx

Analysis

No Change: This PR does not introduce or remove any circular references.


This report was generated automatically by comparing against the develop branch.

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