Merge pull request #56654 from nextcloud/backport/55981/stable32

[stable32] fix(encryption): Increment `lastChunkNr` when size is off
pull/55097/head
Louis 2025-11-25 21:46:42 +07:00 committed by GitHub
commit 04fad49a72
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 0 deletions

@ -464,6 +464,7 @@ class Encryption extends Wrapper {
if (strlen($lastChunkContentEncrypted) > $blockSize) {
$newUnencryptedSize += $unencryptedBlockSize;
$lastChunkContentEncrypted = substr($lastChunkContentEncrypted, $blockSize);
$lastChunkNr++;
}
}