aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorGit'Fellow <12234510+solracsf@users.noreply.github.com>2024-03-04 18:13:45 +0100
committerGitHub <noreply@github.com>2024-03-04 18:13:45 +0100
commit575159b819e87898d09a49ca3fecbf65d200931d (patch)
treeecc52ba2afecd64fe9ae26f9b1ee93f58f406685 /lib
parenta58ed05f1d19d591a1ed384e87915db952c5f163 (diff)
downloadnextcloud-server-575159b819e87898d09a49ca3fecbf65d200931d.tar.gz
nextcloud-server-575159b819e87898d09a49ca3fecbf65d200931d.zip
fix(filecache): Move from array_merge to avoid memory exhaustion
Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/private/Files/Cache/Cache.php9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/private/Files/Cache/Cache.php b/lib/private/Files/Cache/Cache.php
index a512bf76ace..2c53706189a 100644
--- a/lib/private/Files/Cache/Cache.php
+++ b/lib/private/Files/Cache/Cache.php
@@ -585,8 +585,13 @@ class Cache implements ICache {
return $cacheEntry->getPath();
}, $children);
- $deletedIds = array_merge($deletedIds, $childIds);
- $deletedPaths = array_merge($deletedPaths, $childPaths);
+ foreach ($childIds as $childId) {
+ $deletedIds[] = $childId;
+ }
+
+ foreach ($childPaths as $childPath) {
+ $deletedPaths[] = $childPath;
+ }
$query = $this->getQueryBuilder();
$query->delete('filecache_extended')