From 6921fd4c21f590f99239788c3c9767c622bda8d3 Mon Sep 17 00:00:00 2001 From: Pavol Zibrita Date: Fri, 10 Jun 2011 21:14:11 +0200 Subject: [PATCH] another fix for download script to report 404 Not found when no file is supplied for it --- config/site/download.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/config/site/download.php b/config/site/download.php index d042459d24..91d058217a 100755 --- a/config/site/download.php +++ b/config/site/download.php @@ -70,6 +70,10 @@ function update_count_of_downloads($file) { } + if(!isset($_GET['file']) ) { + header('HTTP/1.0 404 Not Found'); + die(1); + } $file = $_GET['file']; if(!isset($_SERVER['HTTP_RANGE']) ) { update_count_of_downloads($file) ;