Merge pull request #10269 from nextcloud/allow-wasm-unsafe-eval-in-csp

Allow "wasm-unsafe-eval" in CSP
This commit is contained in:
Joas Schilling
2023-10-27 07:02:15 +02:00
committed by GitHub

View File

@@ -124,6 +124,10 @@ Added APIs
* ``\OCP\Preview\BeforePreviewFetchedEvent::getWidth``
* ``\OCP\IPhoneNumberUtil::convertToStandardFormat`` to convert input into an E164 formatted phone number. See :ref:`phonenumberutil` for an example.
* ``\OCP\IPhoneNumberUtil::getCountryCodeForRegion`` to get the E164 country code for a given region. See :ref:`phonenumberutil` for an example.
* ``\OCP\AppFramework\Http\EmptyContentSecurityPolicy::allowEvalWasm(bool)``: sets ``wasm-unsafe-eval`` in ``script-src`` of the Content Security Policy `to allow compilation and execution of WebAssembly on the page <https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/script-src#unsafe_webassembly_execution>`_
* ``wasm-unsafe-eval`` is `supported by most browsers <https://caniuse.com/mdn-http_headers_content-security-policy_script-src_wasm-unsafe-eval>`_
* WebAssembly compilation and execution in worker threads is not affected by this directive (browsers allow compilation and execution of WebAssembly in worker threads by default)
Changed APIs
^^^^^^^^^^^^