Skip to content

Commit b9228da

Browse files
authored
Merge pull request #56653 from nextcloud/backport/55981/stable31
[stable31] fix(encryption): Increment `lastChunkNr` when size is off
2 parents cf31ae1 + 8afe1dd commit b9228da

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

lib/private/Files/Storage/Wrapper/Encryption.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -464,6 +464,7 @@ protected function fixUnencryptedSize(string $path, int $size, int $unencryptedS
464464
if (strlen($lastChunkContentEncrypted) > $blockSize) {
465465
$newUnencryptedSize += $unencryptedBlockSize;
466466
$lastChunkContentEncrypted = substr($lastChunkContentEncrypted, $blockSize);
467+
$lastChunkNr++;
467468
}
468469
}
469470

0 commit comments

Comments
 (0)