aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2023-03-09 15:22:38 +0100
committerJulius Härtl <jus@bitgrid.net>2024-06-25 18:37:26 +0200
commitb3b567e78655dd37f7d5e91b7568a97ba1aa2fb3 (patch)
tree953269cf274aa5d3c96ede725fbfe4d9b81f485f /lib/private
parent61213253104cd5719c1ed9fa74935ea6be5b6719 (diff)
downloadnextcloud-server-bugfix/cleanup-s3-multipart.tar.gz
nextcloud-server-bugfix/cleanup-s3-multipart.zip
chore: Address review commentsbugfix/cleanup-s3-multipart
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'lib/private')
-rw-r--r--lib/private/Files/ObjectStore/ObjectStoreStorage.php9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/private/Files/ObjectStore/ObjectStoreStorage.php b/lib/private/Files/ObjectStore/ObjectStoreStorage.php
index 389f744eab4..3494a7db806 100644
--- a/lib/private/Files/ObjectStore/ObjectStoreStorage.php
+++ b/lib/private/Files/ObjectStore/ObjectStoreStorage.php
@@ -661,10 +661,6 @@ class ObjectStoreStorage extends \OC\Files\Storage\Common implements IChunkedFil
return $this->objectStore->initiateMultipartUpload($urn);
}
- /**
- *
- * @throws GenericFileException
- */
public function putChunkedWritePart(
string $targetPath,
string $writeToken,
@@ -675,6 +671,11 @@ class ObjectStoreStorage extends \OC\Files\Storage\Common implements IChunkedFil
if (!$this->objectStore instanceof IObjectStoreMultiPartUpload) {
throw new GenericFileException('Object store does not support multipart upload');
}
+
+ if (!is_numeric($chunkId)) {
+ throw new GenericFileException('Chunk ID must be numeric for S3 multipart upload');
+ }
+
$cacheEntry = $this->getCache()->get($targetPath);
$urn = $this->getURN($cacheEntry->getId());