Skip to content

Commit 0b30415

Browse files
authored
Merge pull request #55981 from nextcloud/artonge/fix/encryption/increment_lastChunkNr
fix(encryption): Increment `lastChunkNr` when size is off
2 parents 80b04bd + 30d567f commit 0b30415

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)