summaryrefslogtreecommitdiffstats
path: root/lib/private/files.php
diff options
context:
space:
mode:
authorLukas Reschke <lukas@statuscode.ch>2014-04-14 20:16:52 +0200
committerLukas Reschke <lukas@statuscode.ch>2014-04-14 20:16:52 +0200
commit2bda3f9ae0893e94bd07a9c8916adcf06aa4a597 (patch)
treea0836b0d75b87d382dcefc5739e96eb00d094e70 /lib/private/files.php
parent463df08088b4ca8957a3bdbcdcc01ab39fe82f63 (diff)
downloadnextcloud-server-2bda3f9ae0893e94bd07a9c8916adcf06aa4a597.tar.gz
nextcloud-server-2bda3f9ae0893e94bd07a9c8916adcf06aa4a597.zip
Use direct link instead of JS
Due to our CSP policy this link won’t work as it it considered as inline Javascript. This commit replaces the link with a static link to the files app. Reimplementation of #8067 - fixes #7742
Diffstat (limited to 'lib/private/files.php')
-rw-r--r--lib/private/files.php5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/private/files.php b/lib/private/files.php
index bfe6d3c02da..e6135c4329f 100644
--- a/lib/private/files.php
+++ b/lib/private/files.php
@@ -231,7 +231,7 @@ class OC_Files {
OC_Template::printErrorPage(
$l->t('ZIP download is turned off.'),
$l->t('Files need to be downloaded one by one.')
- . '<br/><a href="javascript:history.back()">' . $l->t('Back to Files') . '</a>'
+ . '<br/><a href="'.OCP\Util::linkTo('files', '').'">' . $l->t('Back to Files') . '</a>'
);
exit;
}
@@ -258,8 +258,7 @@ class OC_Files {
OC_Template::printErrorPage(
$l->t('Selected files too large to generate zip file.'),
$l->t('Please download the files separately in smaller chunks or kindly ask your administrator.')
- .'<br/><a href="javascript:history.back()">'
- . $l->t('Back to Files') . '</a>'
+ . '<br/><a href="'.OCP\Util::linkTo('files', '').'">' . $l->t('Back to Files') . '</a>'
);
exit;
}