summaryrefslogtreecommitdiff
path: root/classes/handler/public.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2019-08-14 09:49:18 +0300
committerAndrew Dolgov <[email protected]>2019-08-14 09:49:18 +0300
commit3c075bfd21adac9a4dde4fab6bd22886d6173d30 (patch)
tree29e29d6fbb1ce196c5af807338c8a56abf518f85 /classes/handler/public.php
parent65450f8a2bbf325d26177c2589c3a9bbe67d8f80 (diff)
DiskCache: more strict checking for input filenames, getUrl() is no longer static
Diffstat (limited to 'classes/handler/public.php')
-rwxr-xr-xclasses/handler/public.php8
1 files changed, 1 insertions, 7 deletions
diff --git a/classes/handler/public.php b/classes/handler/public.php
index 901844e36..4c904231e 100755
--- a/classes/handler/public.php
+++ b/classes/handler/public.php
@@ -1202,13 +1202,7 @@ class Handler_Public extends Handler {
}
function cached_url() {
- $filename = $_GET['file'];
-
- if (strpos($filename, "/") !== FALSE) {
- list ($cache_dir, $filename) = explode("/", $filename, 2);
- } else {
- $cache_dir = "images";
- }
+ list ($cache_dir, $filename) = explode("/", $_GET["file"], 2);
$cache = new DiskCache($cache_dir);