diff options
Diffstat (limited to 'classes/handler/public.php')
-rwxr-xr-x[-rw-r--r--] | classes/handler/public.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/classes/handler/public.php b/classes/handler/public.php index 8440bc355..e892a9797 100644..100755 --- a/classes/handler/public.php +++ b/classes/handler/public.php @@ -934,17 +934,17 @@ class Handler_Public extends Handler { } function cached_url() { - @$hash = basename($_GET['hash']); + @$req_filename = basename($_GET['hash']); // we don't need an extension to find the file, hash is a complete URL - $hash = preg_replace("/\.[^\.]*$/", "", $hash); + $hash = preg_replace("/\.[^\.]*$/", "", $req_filename); if ($hash) { $filename = CACHE_DIR . '/images/' . $hash; if (file_exists($filename)) { - header("Content-Disposition: inline; filename=\"$hash\""); + header("Content-Disposition: inline; filename=\"$req_filename\""); send_local_file($filename); |