Skip to content

Commit 04fad49

Browse files
authored
Merge pull request #56654 from nextcloud/backport/55981/stable32
[stable32] fix(encryption): Increment `lastChunkNr` when size is off
2 parents 3611995 + 64fed0c commit 04fad49

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

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)