nextcloud-server/lib/private/Files/Storage/Wrapper
Louis Chmn 30d567fd0e fix(encryption): Increment lastChunkNr when size is off
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 <louis@chmn.me>
2025-11-21 17:34:19 +07:00
..
Availability.php fix: make failed availability check apply in the same request 2025-11-06 20:08:44 +07:00
Encoding.php refactor: Fix some easy psalm issues in Files 2025-10-02 13:34:47 +07:00
EncodingDirectoryWrapper.php
Encryption.php fix(encryption): Increment lastChunkNr when size is off 2025-11-21 17:34:19 +07:00
Jail.php refactor(IPropagator): Cleanup implementation 2025-10-08 17:15:18 +07:00
KnownMtime.php
PermissionsMask.php fix(files): Stop overwriting scan_permissions 2025-09-28 14:11:47 +07:00
Quota.php
Wrapper.php refactor: use logical `&&` `||` instead of weak `and` `or` operators 2025-09-27 23:02:18 +07:00