Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukas Reschke <lukas@statuscode.ch>2014-04-13 13:51:03 +0400
committerLukas Reschke <lukas@statuscode.ch>2014-04-13 13:51:03 +0400
commitdf67a04385e64d2e14a7c0385289904d04b53301 (patch)
treeec1a8a3c835c09a8ba59271cac1656ea443e5131 /lib/private/template.php
parent266325eac451fc92d4d390d1f9b97362c317445a (diff)
Move security headers to base.php
Some headers were currently only added to the templates but not to other components (e.g. SabreDAV / JSON / etc...) The migration to base.php ensures that the headers are served to all requests passing base.php
Diffstat (limited to 'lib/private/template.php')
-rw-r--r--lib/private/template.php26
1 files changed, 1 insertions, 25 deletions
diff --git a/lib/private/template.php b/lib/private/template.php
index c6851c6cc8d..b7db5690955 100644
--- a/lib/private/template.php
+++ b/lib/private/template.php
@@ -64,31 +64,7 @@ class OC_Template extends \OC\Template\Base {
$this->path = $path;
parent::__construct($template, $requesttoken, $l10n, $themeDefaults);
-
- // Some headers to enhance security
- header('X-XSS-Protection: 1; mode=block'); // Enforce browser based XSS filters
- header('X-Content-Type-Options: nosniff'); // Disable sniffing the content type for IE
-
- // iFrame Restriction Policy
- $xFramePolicy = OC_Config::getValue('xframe_restriction', true);
- if($xFramePolicy) {
- header('X-Frame-Options: Sameorigin'); // Disallow iFraming from other domains
- }
-
- // Content Security Policy
- // If you change the standard policy, please also change it in config.sample.php
- $policy = OC_Config::getValue('custom_csp_policy',
- 'default-src \'self\'; '
- .'script-src \'self\' \'unsafe-eval\'; '
- .'style-src \'self\' \'unsafe-inline\'; '
- .'frame-src *; '
- .'img-src *; '
- .'font-src \'self\' data:; '
- .'media-src *');
- header('Content-Security-Policy:'.$policy); // Standard
-
- }
-
+}
/**
* autodetect the formfactor of the used device
* default -> the normal desktop browser interface