-
Type: Bug
-
Status: Resolved
-
Priority: Minor
-
Resolution: Fixed
-
Affects Version/s: 2.4.0
-
Fix Version/s: 2.4.58
-
Release Notes Summary:PDF preview with stricter CSP is fixed after upgrading pdf.js version.
-
Tags:
-
Backlog priority:800
-
Sprint:UI - 2021-14, UI Cooldown - 2021-14
Steps to reproduce:
1. Configure Nuxeo with the following (stricter) CSP; sample .jar attached:
default-src 'self'; script-src 'self' data: connect.nuxeo.com apis.google.com app.box.com; style-src 'self' 'unsafe-inline' fonts.googleapis.com; img-src 'self'; font-src 'self' data: fonts.gstatic.com; media-src 'self'; frame-src 'self' www.nuxeo.com accounts.google.com; frame-ancestors 'self'
2. In Web UI with LibreOffice installed (7.1.7 tested), import a .docx file as a File.
3. Observe nuxeo-pdf-viewer in the document's View tab
Expected result: Word document preview renders and is visible.
Actual result: nuxeo-pdf-viewer preview pane remains empty, browser console displays following error (see screenshot):
Uncaught EvalError: Refused to evaluate a string as JavaScript because 'unsafe-eval' is not an allowed source of script in the following Content Security Policy directive: "script-src 'self' data: connect.nuxeo.com apis.google.com app.box.com".
- depends on
-
ELEMENTS-1415 Use an ES5-compatible or legacy version of PDF.js
- Resolved
- is related to
-
WEBUI-640 Fix pdf preview on Safari 15 / Monterey OS
- Resolved
-
ELEMENTS-1456 Bump PDF.js version to latest version in nuxeo-ui-elements
- Resolved
- is required by
-
NXP-30798 Bump nuxeo-ui-elements used by nuxeo-preview-core module
- Resolved
- links to