diff options
author | Robin Appelman <icewind1991@gmail.com> | 2011-04-18 13:16:32 +0200 |
---|---|---|
committer | Robin Appelman <icewind1991@gmail.com> | 2011-04-18 13:16:49 +0200 |
commit | 7684585f49df8d83f3b1677279b5a13f61282a1f (patch) | |
tree | 52f3819f3cc2f90535256cf3f9261377cfb780c7 /files | |
parent | 5896fbd91005cd523bbcbae8a65eb7ce159edc95 (diff) | |
download | nextcloud-server-7684585f49df8d83f3b1677279b5a13f61282a1f.tar.gz nextcloud-server-7684585f49df8d83f3b1677279b5a13f61282a1f.zip |
404 error page
Diffstat (limited to 'files')
-rw-r--r-- | files/download.php | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/files/download.php b/files/download.php index f890036a32e..63209eaccbb 100644 --- a/files/download.php +++ b/files/download.php @@ -33,6 +33,14 @@ if( !OC_USER::isLoggedIn()){ $filename = $_GET["file"]; +if(!OC_FILESYSTEM::file_exists($filename)){ + header("HTTP/1.0 404 Not Found"); + $tmpl = new OC_TEMPLATE( '', '404', 'guest' ); + $tmpl->assign('file',$filename); + $tmpl->printPage(); + exit; +} + $ftype=OC_FILESYSTEM::getMimeType( $filename ); header('Content-Type:'.$ftype); |