mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-13 14:35:55 +00:00
implement hard limits on downloaded data size for general fetching and cache plugins: MAX_DOWNLOAD_FILE_SIZE & MAX_CACHE_FILE_SIZE
This commit is contained in:
2
plugins/cache_starred_images/init.php
Normal file → Executable file
2
plugins/cache_starred_images/init.php
Normal file → Executable file
@@ -194,7 +194,7 @@ class Cache_Starred_Images extends Plugin implements IHandler {
|
||||
//_debug("cache_images: downloading: $src to $local_filename");
|
||||
|
||||
if (!file_exists($local_filename)) {
|
||||
$file_content = fetch_file_contents($src);
|
||||
$file_content = fetch_file_contents(["url" => $src, "max_size" => MAX_CACHE_FILE_SIZE]);
|
||||
|
||||
if ($file_content && strlen($file_content) > MIN_CACHE_FILE_SIZE) {
|
||||
file_put_contents($local_filename, $file_content);
|
||||
|
||||
Reference in New Issue
Block a user