1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-13 01:46:00 +00:00

DiskCache: more strict checking for input filenames, getUrl() is no longer static

This commit is contained in:
Andrew Dolgov
2019-08-14 09:49:18 +03:00
parent 65450f8a2b
commit 3c075bfd21
5 changed files with 16 additions and 16 deletions

View File

@@ -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);