owncloud / web

:dragon_face: Next generation frontend for ownCloud Infinite Scale
https://owncloud.dev/clients/web/
GNU Affero General Public License v3.0
441 stars 157 forks source link

chore: add new csp rules to allow unzipping files #11304

Closed JammingBen closed 3 months ago

JammingBen commented 3 months ago

Description

Adds these 2 CSP rules to our dev setup to make unzipping via wasm work:

Tbh I'm not sure how "unsafe" the second rule is... but AFAIK it's needed for wasm to work. If that isn't an option, we need to look for a different library for unzipping.

Related Issue

Types of changes

update-docs[bot] commented 3 months ago

Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes.

JammingBen commented 3 months ago

@DeepDiver1975 Do you have an opinion about the second CSP rule script-src: wasm-unsafe-eval? Is it generally "safe" to use, or should it be avoided?

DeepDiver1975 commented 3 months ago

from my pov it is as unsafe as unsafe-inline and from my understanding both shall be avoided.

I have little understanding if there is a proper way to make things work without wasm-unsafe-eval.

Usually there is a way to make things work without specing unsafe CSPs - no idea about wasm.

It might be worth to spend some time to research into this and potentially reach out to the libarchive project.

JammingBen commented 3 months ago

Thanks for the feedback! I'll do a little more research then and check potential other libs.

JammingBen commented 3 months ago

I've found another lib that seems to be suitable, hence closing here. Let's be on the safe side.