Skip to content

Conversation

@backportbot
Copy link

@backportbot backportbot bot commented Nov 25, 2025

Backport of PR #55981

@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 31.0.12 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 b9228da into stable31 Nov 25, 2025
238 of 262 checks passed
@artonge artonge deleted the backport/55981/stable31 branch November 25, 2025 20:57
@nextcloud-bot nextcloud-bot mentioned this pull request Dec 3, 2025
7 tasks
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