1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-13 04:05:55 +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

@@ -673,10 +673,12 @@ class Article extends Handler_Protected {
$rv = array();
$cache = new DiskCache("images");
while ($line = $sth->fetch()) {
if (file_exists(CACHE_DIR . '/images/' . sha1($line["content_url"]))) {
$line["content_url"] = DiskCache::getUrl(sha1($line["content_url"]));
if ($cache->exists(sha1($line["content_url"]))) {
$line["content_url"] = $cache->getUrl(sha1($line["content_url"]));
}
array_push($rv, $line);