Skip to content
This repository has been archived by the owner on Jan 30, 2020. It is now read-only.

Add missing directives in CSP #175

Merged
merged 7 commits into from
Dec 2, 2019
Merged

Add missing directives in CSP #175

merged 7 commits into from
Dec 2, 2019

Conversation

MadCat34
Copy link
Contributor

@MadCat34 MadCat34 commented Apr 6, 2019

Provide a narrative description of what you are trying to accomplish:

Some directives are missing in Fetch directive

  • child-src
  • manifest-src
  • worker-src
  • prefetch-src
  • script-src-elem
  • script-src-attr
  • style-src-elem
  • style-src-attr

And some Navigation, Document and Reporting directives are missing.

  • base-uri
  • plugin-types
  • form-action
  • frame-ancestors
  • navigate-to
  • report-to

Code to reproduce the issue

$csp = new ContentSecurityPolicy();
$csp->setDirective('worker-src', ['https://*.google.com', 'http://foo.com']);
$csp->toString();

Actual result

Throw a Exception\InvalidArgumentException

New result

toString() should return "Content-Security-Policy: worker-src https://*.google.com http://foo.com;"

This PR fixes #163

@michalbundyra michalbundyra changed the base branch from master to develop December 2, 2019 20:34
michalbundyra added a commit that referenced this pull request Dec 2, 2019
michalbundyra added a commit that referenced this pull request Dec 2, 2019
@michalbundyra michalbundyra merged commit 0ec168c into zendframework:develop Dec 2, 2019
@michalbundyra
Copy link
Member

Thanks, @MadCat34!

@MadCat34
Copy link
Contributor Author

MadCat34 commented Dec 2, 2019

Thanks, @michalbundyra

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants