diff --git a/files/download.php b/files/download.php index f890036a32..63209eaccb 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); diff --git a/img/weather-clear.png b/img/weather-clear.png new file mode 100644 index 0000000000..0acf7a9b2a Binary files /dev/null and b/img/weather-clear.png differ diff --git a/lib/files.php b/lib/files.php index 642a7e7204..58bb04ec34 100644 --- a/lib/files.php +++ b/lib/files.php @@ -146,7 +146,10 @@ class OC_FILES { } }elseif($zip or !OC_FILESYSTEM::file_exists($filename)){ header("HTTP/1.0 404 Not Found"); - die('404 Not Found'); + $tmpl = new OC_TEMPLATE( '', '404', 'guest' ); + $tmpl->assign('file',$filename); + $tmpl->printPage(); +// die('404 Not Found'); }else{ header("HTTP/1.0 403 Forbidden"); die('403 Forbidden'); diff --git a/plugins/publiclink/get.php b/plugins/publiclink/get.php index cdfe42ef26..fb8a13b541 100644 --- a/plugins/publiclink/get.php +++ b/plugins/publiclink/get.php @@ -70,7 +70,8 @@ if($path!==false){ } }else{ header("HTTP/1.0 404 Not Found"); - echo '404 Not Found'; + $tmpl = new OC_TEMPLATE( '', '404', 'guest' ); + $tmpl->printPage(); die(); } ?> \ No newline at end of file diff --git a/templates/404.php b/templates/404.php new file mode 100644 index 0000000000..7696d16f8e --- /dev/null +++ b/templates/404.php @@ -0,0 +1,9 @@ +
+ " alt="ownCloud" /> + +
\ No newline at end of file