Strict CSP doesn't work when rules are enforced by web server
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 36.9k
- Forks
- 5.2k
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 713
Description
I was under the impression that Nextcloud was supporting strict CSPs now, but for Nextcloud (16.0.2) to run on my server, I still have to allow:
'unsafe-inline' in script-src(PR #16380)- 'unsafe-inline' in style-src
- data: in img-src
- data: in font-src
Without these options (the first 2 atleast), after logging in, the files app fails to load anything, and all the app icons in the header display loading icons, and fail to finish loading.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the post-login failure with the web server enforcing a strict CSP, then inspect the browser console while loading the Files app and header icons. Done means Nextcloud works without the listed unsafe-inline or data: allowances; the issue does not name a file or test to target.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, php
- Domain
- frontend, security
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100