Commit Graph
24 Commits
Author SHA1 Message Date
ldm0 de15d018dd fix(cookies): enforce native SameSite contexts for script and network access
Apply per-cookie SameSite restrictions to script reads while preserving HttpOnly and privileged CDP access. Carry relationship and navigation shape into canonical insertion checks before mutation, including overwrite and expiry deletion. Keep Secure SameSite=None, top-level response allowances and precise rejection reports; remove the blanket cross-site document-cookie denial.

Extracted from development commit 1b521cee146.
Base: wpt/20261030-cookie-age-aware-samesite (a170fb14b8).

Validation (32 build jobs and test threads): cargo fmt --all; cargo clippy --workspace --all-targets --all-features -- -D warnings; cargo nextest run --no-fail-fast.
     Summary [ 150.549s] 22175 tests run: 22175 passed (9 slow), 20 skipped
2026-11-02 11:12:00 +08:00
ldm0 8f6648c1f9 fix(cookies): preserve unknown ages and streamline SameSite checks 2026-11-02 11:09:13 +08:00
ldm0 382c34c749 refactor(cookies): drop unreleased timestamp compatibility 2026-11-02 11:09:13 +08:00
ldm0 2e4fa728e8 refactor(cookies): store creation times as Unix microseconds 2026-11-02 11:09:13 +08:00
ldm0 66aec1d3b5 fix(cookies): report the canonical SameSite mode after overwrite 2026-11-02 11:09:13 +08:00
ldm0 8b0701deeb fix(cookies): apply age-aware Lax-by-default request policy
Record and preserve cookie creation time across updates, browser imports and cache persistence. Apply modern Lax-by-default request inclusion, including the age-bounded unsafe top-level navigation allowance; keep explicit Lax and Strict semantics, raw cookie visibility and diagnostic exclusion reasons. Cover age boundaries, updates, imports, persistence and navigation contexts.
2026-11-02 11:09:13 +08:00
ldm0 800e2d1852 refactor(cookies): restore directly into the canonical jar 2026-11-01 04:03:38 +08:00
ldm0 208c670738 refactor(cookies): keep access touches in memory 2026-11-01 04:03:38 +08:00
ldm0 42680d286e refactor(storage): apply idempotent deltas without existence tracking
Keep the latest Put or Delete for each key rather than eliding transient-row
deletes. Remove existed from Cookie and localStorage deltas and Cookie mutation
observers, then remove the shared uncertain-commit correction hook. Preserve
Cookie Touch composition and atomic, idempotent retry behavior.

Replace optimization-specific assertions with actual SQL replay tests covering
a published put followed by deletion and clear followed by a newer put.
2026-11-01 04:03:38 +08:00
ldm0 2defc40820 feat(cookies): persist canonical cookie deltas in SQLite 2026-11-01 04:03:38 +08:00
ldm0 7b94c7459e fix(storage): honor BiDi cookie partition descriptors 2026-10-28 19:32:35 +08:00
ldm0 57260aff82 refactor(cookies): make delete partition scope explicit 2026-10-28 03:14:09 +08:00
ldm0 790600db9b fix(network): match serialized cookie deletion filters
Match CDP deletion filters literally, validate required fields, and resolve cookies through the owning session. Prefer a nonempty domain over the URL while preserving shared storage and WebDriver deletion semantics.
2026-10-28 03:14:09 +08:00
ldm0 e5cf779e1a fix(network): scope cookie deletion and validate partition keys 2026-10-28 03:14:09 +08:00
ldm0 2f45fbf990 perf(deps): share the pinned IDNA implementation
Resolve cookie and URL IDNA consumers to the pinned rust-url revision,
removing the duplicate registry implementation. Cover Unicode cookie
domains, canonical URLs and host-only matching.

Validation on the unchanged final source tree: cargo fmt --all;
cargo clippy --workspace --all-targets --all-features -- -D warnings;
cargo nextest run --no-fail-fast (20,505 passed, 18 existing skips).
2026-10-21 23:16:23 +08:00
ldm0 9616d01ab1 fix(cookies): handle Unicode expiration dates without panicking 2026-10-11 17:44:26 +08:00
ldm0 dab1b0ed51 refactor: centralize cookie domain parsing and simplify control flow 2026-10-08 19:56:33 +08:00
ldm0 00e18d6aef build(deps): update indexmap to 2.14.2 2026-10-07 18:23:02 +08:00
ldm0 7d562fad12 fix(cookies): isolate partitioned cookie quotas
Exclude partitioned cookies from the unpartitioned global quota and scope
per-domain counting and eviction to the complete partition key. Loading a
Chrome profile with CHIPS cookies now preserves ordinary login cookies
such as V2EX A2.

Add regression coverage for independent global and partition quotas,
partition-local eviction, and replacement at the limit.

Validation: cargo fmt --all and workspace/all-targets/all-features clippy
with -D warnings passed. The three new regressions passed, and a real
Chrome profile retained A2 unchanged and restored the V2EX login.
The full nextest run was stopped at the user's request; an unrelated
non-UTF-8 SQLite filename test failed on this macOS filesystem before
cancellation.
2026-09-17 14:19:03 +08:00
BibekPathak 91ad8c5fd4 fix(cdp): list SameSite=None; Secure cookies for loopback http URLs 2026-09-02 19:41:22 +08:00
ldm0 5547cb593d perf(site): compile public suffix rules into static trie 2026-08-31 03:59:56 +08:00
BibekPathak dda59858b5 fix(cookies): make host-only cookies port-agnostic per RFC 6265 2026-08-26 21:03:53 +08:00
ldm0 36a19dea95 dep: remove unused dependencies 2026-08-26 03:29:25 +08:00
ldm0 27b5135cb6 Public preview 2026-08-11 00:10:12 +08:00