Navigation Menu

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[stable13] Fix integer overflow in ChunkingPlugin #8752

Merged
merged 1 commit into from Mar 9, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 4 additions & 1 deletion apps/dav/lib/Upload/ChunkingPlugin.php
Expand Up @@ -99,7 +99,10 @@ private function verifySize() {
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");
}
}
Expand Down