Skip to content

Conversation

@backportbot
Copy link

@backportbot backportbot bot commented Nov 25, 2025

Backport of PR #55981

@backportbot backportbot bot requested a review from a team as a code owner November 25, 2025 09:19
@backportbot backportbot bot requested review from Altahrim, artonge, come-nc, leftybournes, provokateurin, salmart-dev and yemkareems and removed request for a team November 25, 2025 09:19
@backportbot backportbot bot added bug 3. to review Waiting for reviews feature: encryption (server-side) php Pull requests that update Php code labels Nov 25, 2025
@backportbot backportbot bot added this to the Nextcloud 32.0.3 milestone Nov 25, 2025
When computing the unencrypted file size, we need the size of the last encrypted chunk as its size is usually not the regular 8192 bits.

To avoid reading the whole file, we seek directly to that last chunk based on the expected file size. When the expected file size is smaller than the actual one, we have a logic in place to continue reading until we reach the end of the file.

In that logic, we forgot to increment the `$lastChunkNr` which is important when we later check the signature of the chunk.

This commit adds that missing increment.

Signed-off-by: Louis Chmn <[email protected]>
@artonge artonge merged commit 04fad49 into stable32 Nov 25, 2025
239 of 260 checks passed
@artonge artonge deleted the backport/55981/stable32 branch November 25, 2025 20:46
@nextcloud-bot nextcloud-bot mentioned this pull request Dec 3, 2025
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews bug feature: encryption (server-side) php Pull requests that update Php code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants