@@ -41,55 +41,55 @@ |
||
41 | 41 | * @since 8.1.0 |
42 | 42 | */ |
43 | 43 | class ContentSecurityPolicy extends EmptyContentSecurityPolicy { |
44 | - /** @var bool Whether inline JS snippets are allowed */ |
|
45 | - protected $inlineScriptAllowed = false; |
|
46 | - /** @var bool Whether eval in JS scripts is allowed */ |
|
47 | - protected $evalScriptAllowed = false; |
|
48 | - /** @var array Domains from which scripts can get loaded */ |
|
49 | - protected $allowedScriptDomains = [ |
|
50 | - '\'self\'', |
|
51 | - ]; |
|
52 | - /** |
|
53 | - * @var bool Whether inline CSS is allowed |
|
54 | - * TODO: Disallow per default |
|
55 | - * @link https://github.com/owncloud/core/issues/13458 |
|
56 | - */ |
|
57 | - protected $inlineStyleAllowed = true; |
|
58 | - /** @var array Domains from which CSS can get loaded */ |
|
59 | - protected $allowedStyleDomains = [ |
|
60 | - '\'self\'', |
|
61 | - ]; |
|
62 | - /** @var array Domains from which images can get loaded */ |
|
63 | - protected $allowedImageDomains = [ |
|
64 | - '\'self\'', |
|
65 | - 'data:', |
|
66 | - 'blob:', |
|
67 | - ]; |
|
68 | - /** @var array Domains to which connections can be done */ |
|
69 | - protected $allowedConnectDomains = [ |
|
70 | - '\'self\'', |
|
71 | - ]; |
|
72 | - /** @var array Domains from which media elements can be loaded */ |
|
73 | - protected $allowedMediaDomains = [ |
|
74 | - '\'self\'', |
|
75 | - ]; |
|
76 | - /** @var array Domains from which object elements can be loaded */ |
|
77 | - protected $allowedObjectDomains = []; |
|
78 | - /** @var array Domains from which iframes can be loaded */ |
|
79 | - protected $allowedFrameDomains = []; |
|
80 | - /** @var array Domains from which fonts can be loaded */ |
|
81 | - protected $allowedFontDomains = [ |
|
82 | - '\'self\'', |
|
83 | - ]; |
|
84 | - /** @var array Domains from which web-workers and nested browsing content can load elements */ |
|
85 | - protected $allowedChildSrcDomains = []; |
|
44 | + /** @var bool Whether inline JS snippets are allowed */ |
|
45 | + protected $inlineScriptAllowed = false; |
|
46 | + /** @var bool Whether eval in JS scripts is allowed */ |
|
47 | + protected $evalScriptAllowed = false; |
|
48 | + /** @var array Domains from which scripts can get loaded */ |
|
49 | + protected $allowedScriptDomains = [ |
|
50 | + '\'self\'', |
|
51 | + ]; |
|
52 | + /** |
|
53 | + * @var bool Whether inline CSS is allowed |
|
54 | + * TODO: Disallow per default |
|
55 | + * @link https://github.com/owncloud/core/issues/13458 |
|
56 | + */ |
|
57 | + protected $inlineStyleAllowed = true; |
|
58 | + /** @var array Domains from which CSS can get loaded */ |
|
59 | + protected $allowedStyleDomains = [ |
|
60 | + '\'self\'', |
|
61 | + ]; |
|
62 | + /** @var array Domains from which images can get loaded */ |
|
63 | + protected $allowedImageDomains = [ |
|
64 | + '\'self\'', |
|
65 | + 'data:', |
|
66 | + 'blob:', |
|
67 | + ]; |
|
68 | + /** @var array Domains to which connections can be done */ |
|
69 | + protected $allowedConnectDomains = [ |
|
70 | + '\'self\'', |
|
71 | + ]; |
|
72 | + /** @var array Domains from which media elements can be loaded */ |
|
73 | + protected $allowedMediaDomains = [ |
|
74 | + '\'self\'', |
|
75 | + ]; |
|
76 | + /** @var array Domains from which object elements can be loaded */ |
|
77 | + protected $allowedObjectDomains = []; |
|
78 | + /** @var array Domains from which iframes can be loaded */ |
|
79 | + protected $allowedFrameDomains = []; |
|
80 | + /** @var array Domains from which fonts can be loaded */ |
|
81 | + protected $allowedFontDomains = [ |
|
82 | + '\'self\'', |
|
83 | + ]; |
|
84 | + /** @var array Domains from which web-workers and nested browsing content can load elements */ |
|
85 | + protected $allowedChildSrcDomains = []; |
|
86 | 86 | |
87 | - /** @var array Domains which can embed this Nextcloud instance */ |
|
88 | - protected $allowedFrameAncestors = []; |
|
87 | + /** @var array Domains which can embed this Nextcloud instance */ |
|
88 | + protected $allowedFrameAncestors = []; |
|
89 | 89 | |
90 | - /** @var array Domains from which web-workers can be loaded */ |
|
91 | - protected $allowedWorkerSrcDomains = []; |
|
90 | + /** @var array Domains from which web-workers can be loaded */ |
|
91 | + protected $allowedWorkerSrcDomains = []; |
|
92 | 92 | |
93 | - /** @var array Locations to report violations to */ |
|
94 | - protected $reportTo = []; |
|
93 | + /** @var array Locations to report violations to */ |
|
94 | + protected $reportTo = []; |
|
95 | 95 | } |