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

@@ -101,7 +101,7 @@ class Cache_Starred_Images extends Plugin {
$local_filename = $article_id . "-" . sha1($enc["content_url"]);
if ($this->cache->exists($local_filename)) {
$enc["content_url"] = DiskCache::getUrl("starred-images/" . $local_filename);
$enc["content_url"] = $this->cache->getUrl($local_filename);
}
return $enc;
@@ -123,7 +123,7 @@ class Cache_Starred_Images extends Plugin {
$local_filename = $article_id . "-" . sha1($src);
if ($this->cache->exists($local_filename)) {
$entry->setAttribute("src", DiskCache::getUrl("starred-images/" . $local_filename));
$entry->setAttribute("src", $this->cache->getUrl($local_filename));
$entry->removeAttribute("srcset");
}
}