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

Default install command does not create CSP hash database #832

Closed
CHTJonas opened this issue Mar 15, 2020 · 2 comments
Closed

Default install command does not create CSP hash database #832

CHTJonas opened this issue Mar 15, 2020 · 2 comments

Comments

@CHTJonas
Copy link
Member

@CHTJonas CHTJonas commented Mar 15, 2020

The composer create-project shell one-liner does not create the required csp_hashes.txt file and so navigating to a local web page raises a ContextErrorException.

The exact message is:

Warning: file_get_contents(~camdram/src/Acts/CamdramBundle/EventListener/../../../../web/build/csp_hashes.txt): failed to open stream: No such file or directory
@GKFX

This comment has been minimized.

Copy link
Member

@GKFX GKFX commented Mar 15, 2020

What happens if you then create it but don’t do anything else? echo -n "'unsafe-inline'" > web/build/csp_hashes.txt is the allow-all policy. Is there any CSS or JS loaded?

Running yarn should be a requirement to get the site up as without it there’s no scripts or styles, and running yarn should always generate the hashes.

hoyes added a commit that referenced this issue Mar 16, 2020
@hoyes

This comment has been minimized.

Copy link
Member

@hoyes hoyes commented Mar 16, 2020

I've just made the camdram:assets:download command (which is run as part of create-project) fetch the csp_hashes.txt file from master.dev.camdram.net.

@GKFX GKFX closed this Mar 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.