From e599a8a0bc2bb7ac7b0650d708ca317cf3c39a22 Mon Sep 17 00:00:00 2001 From: ldm0 Date: Mon, 14 Sep 2026 10:48:34 +0800 Subject: [PATCH] fix(stylesheet): enforce integrity before CSSOM installation Validate raw stylesheet response bytes and response eligibility through the shared SRI verifier. Preserve integrity rejection in fetch terminals so failed loads dispatch error and release their load delay without installing a sheet or discovering imports. Require links with integrity metadata to use the compatible fetch cache instead of hydrating an unverified parsed source by URL. Add regressions for hashing, CORS, service-worker filters, local data URLs, redirects, and cached loads. --- moli-renderer-v8/src/stylesheet_blocking.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/moli-renderer-v8/src/stylesheet_blocking.rs b/moli-renderer-v8/src/stylesheet_blocking.rs index 3bf0fa6e1c2..107ffb1d7cb 100644 --- a/moli-renderer-v8/src/stylesheet_blocking.rs +++ b/moli-renderer-v8/src/stylesheet_blocking.rs @@ -467,6 +467,7 @@ impl StylesheetResponseProvenance { request_origin, head, moli_fetch::RequestMode::NoCors, + moli_fetch::RequestRedirectMode::Follow, web_security_disabled, ) .is_none(),