Uploaded image for project: 'Nuxeo Web UI'
  1. Nuxeo Web UI
  2. WEBUI-478

File upload with stricter CSP causes browser console errors

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.4.55
    • Fix Version/s: 2.4.57, 3.0.10
    • Component/s: Upload

      Description

      File upload actions (e.g. through the "Create" or "Import" tabs of nuxeo-document-create-button) successfully execute, but result in browser console errors when CSP with script-src directive lacking 'unsafe-inline' 'unsafe-eval' is used while including org.nuxeo.web.ui.expressions.eval set to false (as seen in WEBUI-60).

      Error seen in console:

      Refused to run the JavaScript URL because it violates the following Content Security Policy directive: "script-src 'self' data: connect.nuxeo.com apis.google.com app.box.com". Either the 'unsafe-inline' keyword, a hash ('sha256-...'), or a nonce ('nonce-...') is required to enable inline execution. Note that hashes do not apply to event handlers, style attributes and javascript: navigations unless the 'unsafe-hashes' keyword is present.
      

      CSP tested:

      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'
      

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 55 minutes
                  55m