Commit Graph
15 Commits
Author SHA1 Message Date
ldm0 b3dd528d44 fix(performance): preserve Service Worker response timing metadata
Retain response type and timing authorization through Response materialization, clone, SW settlement, and direct Worker Fetch completion. Report delivered body bytes without a client network transfer, preserve forwarded CORS restrictions, and avoid re-filtering synthetic Default responses by their request URL.
2026-11-12 00:44:00 +08:00
ldm0 a3d76e11a1 fix(modules): unify CSP admission and honor preload integrity 2026-11-06 02:23:36 +08:00
ldm0 6c1d13bba7 fix(csp): keep module redirect targets private 2026-11-06 00:36:55 +08:00
ldm0 f4850f3cd7 fix(modules): check CSP before each redirect request 2026-11-06 00:36:55 +08:00
ldm0 58f6e9643a fix(modules): enforce destination-specific CSP for synthetic modules 2026-11-06 00:36:55 +08:00
ldm0 a55f7ececc fix(cache): partition renderer resources by fetch destination 2026-11-05 14:32:38 +08:00
ldm0 86ede9afdb fix(stylesheets): reject child integrity failures before CSSOM
Reject integrity-failed parser stylesheet responses in child Documents before preparing or installing an owner CSSStyleSheet. Complete the failed load and release its blocker through the existing terminal path.

Add eight end-to-end URL iframe/srcdoc cases covering initial and cached integrity rejection, matching hashes, CSSOM and computed style, dependent import suppression, and parser/DCL/iframe-load progress.

The regression reproduced the empty-sheet bug at the previous PR head. Validation at 32 build jobs, test threads and Tokio workers: cargo fmt --all; cargo clippy --workspace --all-targets --all-features -- -D warnings; cargo nextest run --no-fail-fast.
Summary [ 146.212s] 22163 tests run: 22163 passed (9 slow), 20 skipped
2026-11-03 07:16:23 +08:00
ldm0 d9290e87ad feat(modules): support native text module imports
Support type: text through the shared module map, Window, child Documents and workers. Export UTF-8 decoded strings without executing their contents, preserve typed-module identity, and carry text request metadata through network, preload and Service Worker loaders. Regressions cover static/dynamic import sharing, BOM and invalid UTF-8, CORS, integrity, worker environments and unsupported-type rejection.

Extracted from development commit a6de018613.
Base: main (62e527cd34).

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 [ 146.817s] 22203 tests run: 22203 passed (9 slow), 20 skipped
2026-11-03 06:30:06 +08:00
ldm0 3c826bd1e8 fix(referrer): use delivered Document policies for Fetch and XHR
Read effective policies from native Document delivery state and preserve them in Fetch and both XHR transport paths. Remove obsolete subtree rescanning and response-only owner lookups.

Validation (32 build jobs / test threads, zero retries):

- `cargo fmt --all`
- `cargo clippy --workspace --all-targets --all-features -- -D warnings`
- `cargo nextest run --no-fail-fast`: Summary [ 141.923s] 21998 tests run: 21998 passed (9 slow), 19 skipped
2026-10-31 18:55:48 +08:00
ldm0 fbe5a80418 fix(script): share the service-worker loader for child classics 2026-09-30 10:28:34 +08:00
ldm0 e53b60bd7c fix(sri): retain supported hashes with malformed padding 2026-09-27 05:46:50 +08:00
ldm0 4a1e6fd196 fix(fetch): unify script headers and CORS response validation
Generate Origin independently of browser destination metadata, and attach script
metadata at classic, module, and preload request builders. Share redirect URL-list
rules across request generation and response validation, and remove final-only
CORS validation from manifests, stylesheets, and request interception.

Reject failed CORS checks even without supported integrity metadata. Preserve CSP
reporting before dynamic script fetches and use committed Window origins for
srcdoc and sandboxed child script/module requests.

Add wire-level Origin, Cookie, and Fetch Metadata regressions, plus manifest,
stylesheet CSSOM, CSP, and child module/preload coverage.
2026-09-13 04:46:51 +08:00
ldm0 b63197ff8a fix(fetch): retain redirect state across service worker fallback
Keep redirect history in Request so Service Worker handoffs, network
redirects, preflights, Origin serialization, cookies, and TLS credentials
share the same state. Avoid reusing another request's response URL list
from the renderer memory cache.

Validate and filter network responses using their full history while
preserving readable Service Worker response filters across streaming and
buffered delivery. Returning to the initiating origin keeps network CORS
tainting; worker-produced responses retain their own filtering.

Add wire-header, credentials, cache, and worker response regressions, and
correct the local Fetch/XHR redirect fixtures to authorize and expose CORS
responses after a cross-origin round trip.
2026-09-13 04:46:51 +08:00
ldm0 c1412b76b9 fix(fetch): preserve redirect response provenance
Distinguish network, service worker, and browser-internal redirects so synthetic responses are not subjected to network CORS checks. Preserve every hop for redirect taint and Origin validation, including across navigation response conversions.

Add seven cross-origin service worker script scenarios and guard CORS checks for cached network redirects without ExtraInfo. The new integration regression fails before the fix and passes afterward.

Validated with cargo fmt --all, workspace Clippy across all targets and features with warnings denied, and cargo nextest run --no-fail-fast: 17459 passed, 13 skipped. Used one build job for the full test run after a parallel-build rustc process was killed.
2026-09-13 04:46:51 +08:00
ldm0 a4364bf149 fix(scripts): validate response eligibility before SRI
Preserve response filtering through script and service worker loading, validate CORS authorization across redirects, and reject opaque responses before computing supported integrity digests. Keep empty and unsupported metadata behavior unchanged.

Add parser, dynamic script, module, and service worker regressions covering 39 scenarios. Validated with cargo fmt --all, full workspace Clippy, and cargo nextest run --no-fail-fast (17457 passed, 13 skipped).
2026-09-13 04:46:51 +08:00