diff options
-rw-r--r-- | lib/public/appframework/http/contentsecuritypolicy.php | 2 | ||||
-rw-r--r-- | tests/lib/appframework/http/ContentSecurityPolicyTest.php | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/public/appframework/http/contentsecuritypolicy.php b/lib/public/appframework/http/contentsecuritypolicy.php index 8132237a228..cb9a241d8af 100644 --- a/lib/public/appframework/http/contentsecuritypolicy.php +++ b/lib/public/appframework/http/contentsecuritypolicy.php @@ -81,7 +81,7 @@ class ContentSecurityPolicy { * @param bool $state * @return $this */ - public function evalScriptState($state = true) { + public function allowEvalScript($state = true) { $this->evalScriptAllowed= $state; return $this; } diff --git a/tests/lib/appframework/http/ContentSecurityPolicyTest.php b/tests/lib/appframework/http/ContentSecurityPolicyTest.php index 3b30bba33d4..739028cb3b5 100644 --- a/tests/lib/appframework/http/ContentSecurityPolicyTest.php +++ b/tests/lib/appframework/http/ContentSecurityPolicyTest.php @@ -66,7 +66,7 @@ class ContentSecurityPolicyTest extends \Test\TestCase { $expectedPolicy = "default-src 'none';script-src 'self';style-src 'self' 'unsafe-inline';img-src 'self';font-src 'self';connect-src 'self';media-src 'self'"; $this->contentSecurityPolicy->allowInlineScript(false); - $this->contentSecurityPolicy->evalScriptState(false); + $this->contentSecurityPolicy->allowEvalScript(false); $this->assertSame($expectedPolicy, $this->contentSecurityPolicy->buildPolicy()); } @@ -201,7 +201,7 @@ class ContentSecurityPolicyTest extends \Test\TestCase { $expectedPolicy = "default-src 'none';script-src 'self' script.owncloud.org;style-src 'self' style.owncloud.org;img-src 'self' img.owncloud.org;font-src 'self' font.owncloud.org;connect-src 'self' connect.owncloud.org;media-src 'self' media.owncloud.org;object-src objects.owncloud.org;frame-src frame.owncloud.org"; $this->contentSecurityPolicy->allowInlineStyle(false) - ->evalScriptState(false) + ->allowEvalScript(false) ->addAllowedScriptDomain('script.owncloud.org') ->addAllowedStyleDomain('style.owncloud.org') ->addAllowedFontDomain('font.owncloud.org') |