diff options
author | Lukas Reschke <lukas@owncloud.com> | 2015-02-25 21:39:49 +0100 |
---|---|---|
committer | Lukas Reschke <lukas@owncloud.com> | 2015-02-25 21:39:49 +0100 |
commit | 94bf2c8d6d58a05a47418e53cfe3d6bcb8d0cd5f (patch) | |
tree | 863e70698d744ee006ada9bffda909bd282998f9 /apps | |
parent | 64c333c44bfb74daf4d3bf29ef4a373e4fe52ad6 (diff) | |
parent | fca4628a5c7b9e56d8c3c195fb1fd1c7eeb1c262 (diff) | |
download | nextcloud-server-94bf2c8d6d58a05a47418e53cfe3d6bcb8d0cd5f.tar.gz nextcloud-server-94bf2c8d6d58a05a47418e53cfe3d6bcb8d0cd5f.zip |
Merge pull request #14509 from owncloud/fix/14231
Show 404 page when accessing empty share URL
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files_sharing/public.php | 8 |
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()); +} |