summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/files_sharing/public.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/apps/files_sharing/public.php b/apps/files_sharing/public.php
index 028c6da12f9..ebc5b7bda45 100644
--- a/apps/files_sharing/public.php
+++ b/apps/files_sharing/public.php
@@ -25,4 +25,10 @@ $urlGenerator = new \OC\URLGenerator(\OC::$server->getConfig());
$token = isset($_GET['t']) ? $_GET['t'] : '';
$route = isset($_GET['download']) ? 'files_sharing.sharecontroller.downloadShare' : 'files_sharing.sharecontroller.showShare';
-OC_Response::redirect($urlGenerator->linkToRoute($route, array('token' => $token)));
+if($token !== '') {
+ OC_Response::redirect($urlGenerator->linkToRoute($route, array('token' => $token)));
+} else {
+ header('HTTP/1.0 404 Not Found');
+ $tmpl = new OCP\Template('', '404', 'guest');
+ print_unescaped($tmpl->fetchPage());
+}