nextcloud/lib/private/Files
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 +01:00
..
AppData chore: Add SPDX header 2024-05-24 13:11:22 +02:00
Cache chore: better type hints for getAvailability 2025-11-06 20:09:17 +01:00
Config feat(mounts): optimize load of mounts by filtering on database side 2025-08-26 08:55:24 +02:00
Conversion chore: apply new CSFixer rules 2025-07-01 16:26:50 +02:00
Lock chore: Add SPDX header 2024-05-24 13:11:22 +02:00
Mount perf(preview): Optimize migration and simplify DB layout 2025-10-06 13:37:15 +02:00
Node fix(files): Always return a valid mimetype 2025-10-06 09:06:17 +02:00
Notify chore: apply new CSFixer rules 2025-07-01 16:26:50 +02:00
ObjectStore feat(objectstore): add configurable S3 retry attempts 2025-11-19 16:17:43 +01:00
Search chore: apply new CSFixer rules 2025-07-01 16:26:50 +02:00
SimpleFS chore: apply new CSFixer rules 2025-07-01 16:26:50 +02:00
Storage fix(encryption): Increment lastChunkNr when size is off 2025-11-21 17:34:19 +01:00
Stream fix(files): decrement quota by actual bytes written in stream_write 2025-10-13 18:26:48 -04:00
Template fix: validate filename when creating file from template 2025-10-24 01:05:48 +02:00
Type refactor: Remove old TemplateManager 2025-09-28 12:48:41 +02:00
Utils refactor: use logical && || instead of weak and or operators 2025-09-27 23:02:18 +02:00
FileInfo.php fix(files): Always return a valid mimetype 2025-10-06 09:06:17 +02:00
FilenameValidator.php fix(FilenameValidator): use _ as default replacement for invalid chars 2025-06-18 09:44:57 +02:00
Filesystem.php chore: Remove unused deprecated methods from OC_User and Filesystem 2025-09-28 22:44:30 +02:00
SetupManager.php fix: don't update cached mountpoints if the request doesn't have filesystem access 2025-07-31 18:28:26 +02:00
SetupManagerFactory.php fix: Replace OC_App::loadApp calls by IAppManager 2025-07-10 11:40:27 +02:00
View.php chore: Explicitely mark \OC\Files\View as internal 2025-10-06 15:49:55 +02:00