From 5ca6026d80f839c4563ea879d343483a7a4d0bd9 Mon Sep 17 00:00:00 2001 From: Calixte Denizet Date: Mon, 8 Jun 2026 22:14:52 +0200 Subject: [PATCH] Drop 'unsafe-inline' from the CSP style-src directives The print service injected the per-PDF `@page { size }` rule as an inline to match the PDF's page - // dimensions. If the CSP `style-src-elem` directive blocks inline - // - at print time (web/pdf_print_service.js, web/firefox_print_service.js) - to match the PDF's page dimensions. Since the size varies per PDF the - content can't be pre-hashed, so style-src-elem allows 'unsafe-inline'. - Inline style="…" attributes stay blocked via style-src (no fallback). - --> diff --git a/web/viewer.html b/web/viewer.html index 66d22271a..c7e60ca86 100644 --- a/web/viewer.html +++ b/web/viewer.html @@ -29,33 +29,26 @@ See https://github.com/adobe-type-tools/cmap-resources PDF.js viewer -