Commit Graph

181 Commits (e2ea6d46802255cd1dcdedf0c0d5aeabdcaf283d)

Author SHA1 Message Date
Côme Chilliet 8c21f2b19c fix(encryption): Fix TypeError when trying to decrypt unencrypted file
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-08-25 13:18:50 +07:00
Côme Chilliet 4427050f84 fix(encryption): Correctly handle file opening and copying failures
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-07-03 15:19:34 +07:00
Ferdinand Thiessen 5981b7eb51
chore: apply new CSFixer rules
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>

# Conflicts:
#	apps/settings/lib/SetupChecks/PhpOpcacheSetup.php
2025-07-01 16:26:50 +07:00
Ferdinand Thiessen 01db539d0a
chore: move streamCopy implementation from `OC_Helper` to `OCP\Files`
The function was already there but called the legacy version.
So moved the implementation and migrated all usages of it.
Sadly the interface was slightly different so adjusted it to be
compatible with both legacy and the OCP one.

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2025-05-16 13:03:05 +07:00
Côme Chilliet a86d917907 fix(encryption): Only prevent cache deletion if target is not object store in moveFromStorage
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-05-13 23:37:52 +07:00
Côme Chilliet a79b5dea7c fix(encryption): Improve Update class and event listenening
to avoid back&forth between path and Node object

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-05-13 23:37:52 +07:00
Côme Chilliet e6275f8759 fix: Preserve file id when moving from object store even if encryption wrapper is present
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-05-13 23:37:52 +07:00
Côme Chilliet 9bb0721d66 fix: Fix mtime preservation when moving a directory across storages with encryption registered
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-05-13 23:37:52 +07:00
Côme Chilliet 8779ae38a4 fix(encryption): Fix filesize for part files in Encryption wrapper
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-05-13 23:37:52 +07:00
Robin Appelman 768b101a9d
Merge pull request #52706 from nextcloud/info-file-more-encryption-checks
feat: add more encryption checks to info:file
2025-05-12 13:17:26 +07:00
Robin Appelman e6bdfcd8ed
Merge pull request #52665 from nextcloud/mountpoint-mkdir-quota
fix: create mountpoint folder even if the user has a quota of 0
2025-05-12 13:17:02 +07:00
Robin Appelman b0b8159d6a
fix: throw a better error if we can't get the encrypted header size
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-05-09 22:33:45 +07:00
Robin Appelman d9c53ef748
feat: add more encryption checks to info:file
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-05-09 16:35:31 +07:00
Robin Appelman cd75876c1e fix: create mountpoint folder even if the user has a quota of 0
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-05-08 15:15:36 +07:00
Robin Appelman 012a402cec fix: restore updated encrypted version when copying versions
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-01-03 15:21:01 +07:00
Louis 27331d48e3
Merge pull request #48651 from nextcloud/artonge/fix/copy_cache_during_copy_operations
fix(files): Correctly copy the cache information during copy operations
2024-12-04 16:58:01 +07:00
Robin Appelman ae30269eac
fix: don't set 'name' on null metadata
Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-12-03 19:12:45 +07:00
Louis Chemineau 199b0bd4d9
fix(files): Correctly copy the cache information on copy operations
Needed to copy the `encrypted` flag of encrypted files when those files are two level down in a moved folder.

Signed-off-by: Louis Chemineau <louis@chmn.me>
2024-12-03 17:04:44 +07:00
Git'Fellow 60d956f39f refactor(storage): Code adjustements and simplifications
Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
2024-11-21 10:02:00 +07:00
provokateurin 0de4843b73 refactor(Storage): Align all Storage constructors
Signed-off-by: provokateurin <kate@provokateurin.de>
2024-10-23 13:24:18 +07:00
Kate 43b1fd7bb8
Merge pull request #48623 from nextcloud/fix/allow-quota-wrapper-check 2024-10-09 18:39:42 +07:00
Julius Knorr 75381dfe0c
fix: Allow overriding shouldApplyQuota check from child classes
Signed-off-by: Julius Knorr <jus@bitgrid.net>
2024-10-09 08:25:30 +07:00
provokateurin f28e74b7a8
refactor(Storage): Make all parameter types strong types
Signed-off-by: provokateurin <kate@provokateurin.de>
2024-10-07 15:00:05 +07:00
provokateurin 4412b2b8a8
refactor(Wrapper\Encryption): Migrate to strong types
Signed-off-by: provokateurin <kate@provokateurin.de>
2024-10-07 14:11:56 +07:00
provokateurin e1998b6b6c
fix(Storage): Fix getDirectoryContent() return type
Signed-off-by: provokateurin <kate@provokateurin.de>
2024-09-30 16:49:27 +07:00
provokateurin 7cdccd058f
fix(Storage): Fix IStorage return types
Signed-off-by: provokateurin <kate@provokateurin.de>
2024-09-26 18:13:03 +07:00
provokateurin 9836e9b164
chore(deps): Update nextcloud/coding-standard to v1.3.1
Signed-off-by: provokateurin <kate@provokateurin.de>
2024-09-19 14:21:20 +07:00
provokateurin d2d1e3284d
fix(Storage): Fix method docs inheritance
Signed-off-by: provokateurin <kate@provokateurin.de>
2024-09-17 10:20:38 +07:00
provokateurin 8ca6fcace7
fix(Storage): Document getOwner() can return false
Signed-off-by: provokateurin <kate@provokateurin.de>
2024-09-17 10:10:50 +07:00
Côme Chilliet ed0ac284e3
chore: Remove deprecated Storage::search method instead of moving it to IStorage
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2024-09-16 18:11:38 +07:00
Louis Chemineau 6674f790a9 fix(files): Ensure that the hash method does not return null
To match beececf660/lib/private/Files/View.php (L1050)

- Fix https://github.com/nextcloud/server/issues/44110

Signed-off-by: Louis Chemineau <louis@chmn.me>
2024-09-16 15:07:21 +07:00
Daniel Kesselberg af6de04e9e
style: update codestyle for coding-standard 1.2.3
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2024-08-25 19:34:58 +07:00
Robin Appelman 3756152cb1
fix: use mountpoint from storage to find the encryption keys
Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-08-20 13:32:03 +07:00
Côme Chilliet 277c2cf5d1
fix(encryption): Fix mountpoint check to accept if several are found
There is no strong requirement to have only one mount for a given
 storage id. Also the error in this case would be misleading.

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2024-08-05 17:34:25 +07:00
withbest dd08f93202 chore: fix some comments
Signed-off-by: withbest <seekseat@outlook.com>
2024-07-29 14:43:27 +07:00
Andy Scherzinger dae7c159f7
chore: Add SPDX header
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2024-05-24 13:11:22 +07:00
Julius Härtl e0fcf6b700
Merge pull request #44294 from nextcloud/fix/storage-mount-owner
fix: Pass the mountpoint target user to storages without owner
2024-04-09 13:18:13 +07:00
Julius Härtl 4910e7e231
fix: Pass the mountpoint target user to storages without owner
Storages that do not have a dedicated owner (e.g. groupfolders, external
storages) currently always assume the current session user as the owner.
This leads to several issues when there is no user session but a node is
obtained through a user folder.

In order to have the correct user available we need to pass the user
that is used to setup a mountpoint along to the storage layer as we
generally assume that an owner is available for those.

Signed-off-by: Julius Härtl <jus@bitgrid.net>
2024-04-09 09:04:24 +07:00
Robin Appelman d31ed8dbca
fix: use proper jailed patch in watcher
Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-04-08 18:37:05 +07:00
Côme Chilliet ec5133b739 fix: Apply new coding standard to all files
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2024-04-02 14:16:21 +07:00
Robin Appelman d5fa2ec7c3
fix: log error when default getWrapperStorage would return null
Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-03-20 14:26:01 +07:00
Robin Appelman ea8a774a0a fix: add some recrusive detection/prevention
Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-03-08 14:20:14 +07:00
Joas Schilling aa5f037af7
chore: apply changes from Nextcloud coding standards 1.1.1
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
2023-11-23 10:36:13 +07:00
Robin Appelman 460344336e
optimize cache jail creation
Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-10-19 19:27:00 +07:00
Hamid Dehnavi ea06cf2f39 Convert isset ternary to null coalescing operator
Signed-off-by: Hamid Dehnavi <hamid.dev.pro@gmail.com>
2023-09-28 17:44:19 +07:00
Robin Appelman 5bf34979fe add wrapper to ensure we don't get an mtime that is lower than we know it is
Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-09-19 13:58:15 +07:00
Julius Härtl 88a96e4db7 fix: Only store unencrypted_size if path should be encrypted
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2023-09-06 07:25:28 +07:00
Robin Appelman e4f85226c5
extend fix-key-location to handle cases from broken cross-storage moves
Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-08-31 19:46:47 +07:00
Robin Appelman b6c3507aa0 only determine quota_include_external_storage once for quota wrapper
Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-08-18 14:25:28 +07:00
Richard Steinmetz c4eccbb304
fix(sse): don't update uncached files
Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
2023-07-04 12:42:29 +07:00