diff options
author | Andrew Dolgov <[email protected]> | 2018-05-20 11:08:33 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2018-05-20 11:08:33 +0300 |
commit | b14f6d58b472e20b3e6cffd54916ea4fea526acd (patch) | |
tree | 269b7d41fe1d32c6728a3db0b674f27bd0552296 /plugins/cache_starred_images/init.php | |
parent | f851cdf3628ba90dac4f1891eae3b1aea9261eb5 (diff) |
implement hard limits on downloaded data size for general fetching and cache plugins: MAX_DOWNLOAD_FILE_SIZE & MAX_CACHE_FILE_SIZE
Diffstat (limited to 'plugins/cache_starred_images/init.php')
-rwxr-xr-x[-rw-r--r--] | plugins/cache_starred_images/init.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/cache_starred_images/init.php b/plugins/cache_starred_images/init.php index 6c32ff57f..8a3464e0d 100644..100755 --- a/plugins/cache_starred_images/init.php +++ b/plugins/cache_starred_images/init.php @@ -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); |