Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow "wasm-unsafe-eval" in CSP #38082

Merged
merged 1 commit into from
Aug 11, 2023
Merged

Commits on Aug 10, 2023

  1. Allow "wasm-unsafe-eval" in CSP

    If a page has a Content Security Policy header and the `script-src` (or
    `default-src`) directive does not contain neither `wasm-unsafe-eval` nor
    `unsafe-eval` loading and executing WebAssembly is blocked in the page
    (although it is still possible to load and execute WebAssembly in a
    worker thread).
    
    Although the Nextcloud classes to manage the CSP already supported
    allowing `unsafe-eval` this affects not only WebAssembly, but also the
    `eval` operation in JavaScript.
    
    To make possible to allow WebAssembly execution without allowing
    JavaScript `eval` this commit adds support for allowing
    `wasm-unsafe-eval`.
    
    Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
    danxuliu committed Aug 10, 2023
    Configuration menu
    Copy the full SHA
    41f2d91 View commit details
    Browse the repository at this point in the history