Repository navigation
[Claimed #3465] fix(extension): respect host-only cookie domains - #3468
Merged
Merged
Conversation
🦋 Changeset detectedLatest commit: c008c29 The changes in this PR will be included in the next version bump. This PR includes changesets to release 19 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Contributor
Author
|
This mirrored PR has been merged into |
shrey150
approved these changes
Nov 16, 2026
This was referenced Nov 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Mirrored from external contributor PR #3465 after approval by @shrey150.
Original author: @Kelvin-Waititu
Original PR: #3465
Approved source head SHA:
c008c299ceadac61d672538f6f90bf8b9387e095@Kelvin-Waititu, please continue any follow-up discussion on this mirrored PR. When the external PR gets new commits, this same internal PR will be marked stale until the latest external commit is approved and refreshed here.
Original description
Summary
Fixes #3464.
context.cookies("https://sub.example.com/")returned host-only cookies forexample.com, even though those cookies do not apply to the requested host. Preserve the original domain's leading-dot distinction: host-only cookies require an exact hostname, while dotted domains also match subdomains on a dot boundary.Add focused regression tests for exact hosts, subdomains and nested subdomains, unrelated suffixes, dotted domain cookies, secure URLs, path boundaries, and multiple/empty URL filters. Include patch changesets for the extension and TypeScript/Python SDKs that bundle it. No protocol or API changes.
Validation
node_modules/.bin/tsc --noEmit -p packages/extension/tsconfig.jsonpassed.node_modules/.bin/vite build --config packages/extension/vite.config.tspassed.git diff --checkpassed.The first broader test run was blocked by sandbox restrictions on local HTTP listeners and missing build artifacts. After building the extension and rerunning outside the sandbox, the entire extension suite passed. No live-browser integration test or full monorepo/Python suite was run.
pnpmandjustwere unavailable on PATH, so checks used the installed workspace executables directly.Summary by cubic
Fixes #3464 by correcting cookie domain matching in the extension so host-only cookies no longer match subdomains they don't apply to.
Previously,
filterCookiesnormalized every cookie domain with a leading dot, causing host-only cookies likeexample.comto be matched againstsub.example.com. Now host-only cookies require an exact hostname match, while dotted domains (.example.com) still match subdomains on a dot boundary.Bug Fixes
No protocol or API changes.
Written for commit c008c29. Summary will update on new commits.