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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user