summaryrefslogtreecommitdiffstats
path: root/core/templates
diff options
context:
space:
mode:
authorLukas Reschke <lukas@statuscode.ch>2016-10-24 16:31:06 +0200
committerLukas Reschke <lukas@statuscode.ch>2016-10-24 16:35:31 +0200
commit38b3ac8213d152a9ea8473cbb558605fb165e91f (patch)
treef0973f2ed58b0b3bfb906c6bd7c099c092383bc8 /core/templates
parent9e6634814ee682be20ac419afeef02a4b53fb47d (diff)
downloadnextcloud-server-38b3ac8213d152a9ea8473cbb558605fb165e91f.tar.gz
nextcloud-server-38b3ac8213d152a9ea8473cbb558605fb165e91f.zip
Add ContentSecurityPolicyNonceManager
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
Diffstat (limited to 'core/templates')
-rw-r--r--core/templates/layout.base.php2
-rw-r--r--core/templates/layout.guest.php2
-rw-r--r--core/templates/layout.user.php2
3 files changed, 3 insertions, 3 deletions
diff --git a/core/templates/layout.base.php b/core/templates/layout.base.php
index d6fda96dd68..3f13523afcb 100644
--- a/core/templates/layout.base.php
+++ b/core/templates/layout.base.php
@@ -19,7 +19,7 @@
<link rel="stylesheet" href="<?php print_unescaped($cssfile); ?>" media="print">
<?php endforeach; ?>
<?php foreach ($_['jsfiles'] as $jsfile): ?>
- <script src="<?php print_unescaped($jsfile); ?>" nonce="<?php p(base64_encode($_['requesttoken'])) ?>"></script>
+ <script nonce="<?php p(\OC::$server->getContentSecurityPolicyNonceManager()->getNonce()) ?>" src="<?php print_unescaped($jsfile); ?>"></script>
<?php endforeach; ?>
<?php print_unescaped($_['headers']); ?>
</head>
diff --git a/core/templates/layout.guest.php b/core/templates/layout.guest.php
index a93224af5cc..6d46ac6cf2c 100644
--- a/core/templates/layout.guest.php
+++ b/core/templates/layout.guest.php
@@ -20,7 +20,7 @@
<link rel="stylesheet" href="<?php print_unescaped($cssfile); ?>" media="print">
<?php endforeach; ?>
<?php foreach($_['jsfiles'] as $jsfile): ?>
- <script nonce="<?php p(base64_encode($_['requesttoken'])) ?>" src="<?php print_unescaped($jsfile); ?>"></script>
+ <script nonce="<?php p(\OC::$server->getContentSecurityPolicyNonceManager()->getNonce()) ?>" src="<?php print_unescaped($jsfile); ?>"></script>
<?php endforeach; ?>
<?php print_unescaped($_['headers']); ?>
</head>
diff --git a/core/templates/layout.user.php b/core/templates/layout.user.php
index d3dcd979d38..d258e3582d0 100644
--- a/core/templates/layout.user.php
+++ b/core/templates/layout.user.php
@@ -27,7 +27,7 @@
<link rel="stylesheet" href="<?php print_unescaped($cssfile); ?>" media="print">
<?php endforeach; ?>
<?php foreach($_['jsfiles'] as $jsfile): ?>
- <script nonce="<?php p(base64_encode($_['requesttoken'])) ?>" src="<?php print_unescaped($jsfile); ?>"></script>
+ <script nonce="<?php p(\OC::$server->getContentSecurityPolicyNonceManager()->getNonce()) ?>" src="<?php print_unescaped($jsfile); ?>"></script>
<?php endforeach; ?>
<?php print_unescaped($_['headers']); ?>
</head>