summaryrefslogtreecommitdiff
path: root/plugins/cache_starred_images
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2018-05-20 11:08:33 +0300
committerAndrew Dolgov <[email protected]>2018-05-20 11:08:33 +0300
commitb14f6d58b472e20b3e6cffd54916ea4fea526acd (patch)
tree269b7d41fe1d32c6728a3db0b674f27bd0552296 /plugins/cache_starred_images
parentf851cdf3628ba90dac4f1891eae3b1aea9261eb5 (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')
-rwxr-xr-x[-rw-r--r--]plugins/cache_starred_images/init.php2
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);