diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2019-01-07 13:13:34 +0100 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2019-01-07 15:07:06 +0100 |
commit | 64244e1a4fe3d287fc7764e9f64c65777384fff0 (patch) | |
tree | 8aa09a32117438094d7dfa22c4e183afd3974338 /tests/lib/AppFramework/Http/ResponseTest.php | |
parent | b820803cf1def6a6bfe398d1564dd0d9a3a3a9e0 (diff) | |
download | nextcloud-server-64244e1a4fe3d287fc7764e9f64c65777384fff0.tar.gz nextcloud-server-64244e1a4fe3d287fc7764e9f64c65777384fff0.zip |
CSP: Allow fonts to be provided in data
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'tests/lib/AppFramework/Http/ResponseTest.php')
-rw-r--r-- | tests/lib/AppFramework/Http/ResponseTest.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/lib/AppFramework/Http/ResponseTest.php b/tests/lib/AppFramework/Http/ResponseTest.php index 61cfe2cabdc..b7939173673 100644 --- a/tests/lib/AppFramework/Http/ResponseTest.php +++ b/tests/lib/AppFramework/Http/ResponseTest.php @@ -59,14 +59,14 @@ class ResponseTest extends \Test\TestCase { $this->childResponse->setHeaders($expected); $headers = $this->childResponse->getHeaders(); - $expected['Content-Security-Policy'] = "default-src 'none';base-uri 'none';manifest-src 'self';script-src 'self';style-src 'self' 'unsafe-inline';img-src 'self' data: blob:;font-src 'self';connect-src 'self';media-src 'self'"; + $expected['Content-Security-Policy'] = "default-src 'none';base-uri 'none';manifest-src 'self';script-src 'self';style-src 'self' 'unsafe-inline';img-src 'self' data: blob:;font-src 'self' data:;connect-src 'self';media-src 'self'"; $this->assertEquals($expected, $headers); } public function testOverwriteCsp() { $expected = [ - 'Content-Security-Policy' => "default-src 'none';base-uri 'none';manifest-src 'self';script-src 'self' 'unsafe-inline';style-src 'self' 'unsafe-inline';img-src 'self';font-src 'self';connect-src 'self';media-src 'self'", + 'Content-Security-Policy' => "default-src 'none';base-uri 'none';manifest-src 'self';script-src 'self' 'unsafe-inline';style-src 'self' 'unsafe-inline';img-src 'self';font-src 'self' data:;connect-src 'self';media-src 'self'", ]; $policy = new Http\ContentSecurityPolicy(); $policy->allowInlineScript(true); |