Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2018-03-09 13:23:28 +0300
committerGitHub <noreply@github.com>2018-03-09 13:23:28 +0300
commit0f1567d8faee6b762657ade5e745442704f56c7d (patch)
tree4972c93a33e12435af7b6cdc27a84a841f9c57e8 /apps
parente2728aaf387996bbe4d5f35056571ef3b6a6052b (diff)
parentba7cc279e65a49ccdf4ee6facadb2b2c130c1cf9 (diff)
Merge pull request #8752 from nextcloud/13-8112
[stable13] Fix integer overflow in ChunkingPlugin
Diffstat (limited to 'apps')
-rw-r--r--apps/dav/lib/Upload/ChunkingPlugin.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/apps/dav/lib/Upload/ChunkingPlugin.php b/apps/dav/lib/Upload/ChunkingPlugin.php
index 5768f53c2b4..858129dd598 100644
--- a/apps/dav/lib/Upload/ChunkingPlugin.php
+++ b/apps/dav/lib/Upload/ChunkingPlugin.php
@@ -99,7 +99,10 @@ class ChunkingPlugin extends ServerPlugin {
return;
}
$actualSize = $this->sourceNode->getSize();
- if ((int)$expectedSize !== $actualSize) {
+
+ // casted to string because cast to float cause equality for non equal numbers
+ // and integer has the problem of limited size on 32 bit systems
+ if ((string)$expectedSize !== (string)$actualSize) {
throw new BadRequest("Chunks on server do not sum up to $expectedSize but to $actualSize bytes");
}
}