aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2024-11-18 17:35:09 +0100
committerRobin Appelman <robin@icewind.nl>2024-12-05 14:07:37 +0100
commit7da8951c57b07d0ee90c16129367255e4217cb81 (patch)
tree14310093f65a84db4875b2251e02f2751e7e70af /lib
parent7bc21d8a34e9d4a0a066a0069a9a7abf13158368 (diff)
downloadnextcloud-server-7da8951c57b07d0ee90c16129367255e4217cb81.tar.gz
nextcloud-server-7da8951c57b07d0ee90c16129367255e4217cb81.zip
fix: use php://temp instead of php://memory for multi-part upload buffer
this should reduce potential memory issues if the limit is set very high Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'lib')
-rw-r--r--lib/private/Files/ObjectStore/S3ObjectTrait.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/private/Files/ObjectStore/S3ObjectTrait.php b/lib/private/Files/ObjectStore/S3ObjectTrait.php
index 2e625033751..dfe96294c69 100644
--- a/lib/private/Files/ObjectStore/S3ObjectTrait.php
+++ b/lib/private/Files/ObjectStore/S3ObjectTrait.php
@@ -144,7 +144,7 @@ trait S3ObjectTrait {
// ($psrStream->isSeekable() && $psrStream->getSize() !== null) evaluates to true for a On-Seekable stream
// so the optimisation does not apply
- $buffer = new Psr7\Stream(fopen('php://memory', 'rwb+'));
+ $buffer = new Psr7\Stream(fopen('php://temp', 'rwb+'));
Utils::copyToStream($psrStream, $buffer, $this->putSizeLimit);
$buffer->seek(0);
if ($buffer->getSize() < $this->putSizeLimit) {