]> source.dussan.org Git - nextcloud-server.git/commitdiff
Use direct link instead of JS
authorLukas Reschke <lukas@statuscode.ch>
Mon, 14 Apr 2014 18:16:52 +0000 (20:16 +0200)
committerLukas Reschke <lukas@statuscode.ch>
Mon, 14 Apr 2014 18:16:52 +0000 (20:16 +0200)
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

lib/private/files.php

index bfe6d3c02da2dae8be95bd9234c09f5625fef1b2..e6135c4329f7dcd02966519ebff5a5cf558b217e 100644 (file)
@@ -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;
                        }