nextcloud-server/lib/private/Files/Storage
Louis Chmn 8afe1dd53a 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-25 09:19:09 +07:00
..
PolyFill refactor(Storage): Make all parameter types strong types 2024-10-07 15:00:05 +07:00
Wrapper fix(encryption): Increment lastChunkNr when size is off 2025-11-25 09:19:09 +07:00
Common.php chore: better type hints for `getAvailability` 2025-11-12 17:45:41 +07:00
CommonTest.php refactor(Storage): Align all Storage constructors 2024-10-23 13:24:18 +07:00
DAV.php chore: use `$this->logger` and prevent Server::get 2024-11-08 10:56:30 +07:00
FailedStorage.php refactor(Storage): Align all Storage constructors 2024-10-23 13:24:18 +07:00
Home.php refactor(Storage): Align all Storage constructors 2024-10-23 13:24:18 +07:00
Local.php refactor(storage): Code adjustements and simplifications 2024-11-21 10:02:00 +07:00
LocalRootStorage.php refactor(Storage): Make all parameter types strong types 2024-10-07 15:00:05 +07:00
LocalTempFileTrait.php refactor(Storage): Make all parameter types strong types 2024-10-07 15:00:05 +07:00
Storage.php refactor(Storage): Make all parameter types strong types 2024-10-07 15:00:05 +07:00
StorageFactory.php refactor(Storage): Make all parameter types strong types 2024-10-07 15:00:05 +07:00
Temporary.php refactor(Storage): Align all Storage constructors 2024-10-23 13:24:18 +07:00