Commit graph

1701 commits

Author SHA1 Message Date
Robin Appelman
fe29175144
Merge pull request #52884 from nextcloud/backport/52873/stable30
[stable30] fix: improve error message when cache rename source can't be found
2025-05-25 16:50:16 +02:00
provokateurin
8ed7fdafaf
fix(SetupManager): Include home and root providers when registering mounts
Signed-off-by: provokateurin <kate@provokateurin.de>
2025-05-20 15:14:08 +02:00
Kate
119727d74a
Merge pull request #52759 from nextcloud/backport/49352/stable30 2025-05-19 06:44:24 +02:00
Robin Appelman
09e1ecd15b
Merge pull request #52867 from nextcloud/backport/51603/stable30
[stable30] Add command to list orphan objects
2025-05-16 21:36:28 +02:00
Louis
921c98e4df
Merge pull request #52696 from nextcloud/backport/49903/stable30 2025-05-16 16:23:56 +02:00
Robin Appelman
a4f0a9c7ca fix: improve error message when cache rename source can't be found
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-05-15 16:34:39 +00:00
Robin Appelman
86206e9bac fix: keep IObjectStoreMetaData in private namespace for backports
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-05-15 18:00:35 +02:00
Robin Appelman
ca6e59c820
Merge pull request #52824 from nextcloud/backport/52775/stable30
[stable30] fix unjailedroot of nested jails if there are other wrappers in between
2025-05-15 14:57:11 +02:00
Robin Appelman
9da4ebd650 feat: add command to list objects
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-05-15 14:13:06 +02:00
Robin Appelman
042934a99f feat: add command to get object metadata
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-05-15 14:13:06 +02:00
Robin Appelman
855f3f1b4f
Merge pull request #52763 from nextcloud/backport/52706/stable30
[stable30] feat: add more encryption checks to info:file
2025-05-15 14:05:34 +02:00
Robin Appelman
b253b70d16
Merge pull request #52761 from nextcloud/backport/52707/stable30
[stable30] fix: throw a better error if we can't get the encrypted header size
2025-05-15 14:03:07 +02:00
Robin Appelman
195358eb8e fix: fix unjailedroot of nested jails if there are other wrappers in between
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-05-14 20:08:02 +02:00
Robin Appelman
e5aabded60 test: add test for nested cache jail unjailedroot
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-05-14 20:06:56 +02:00
Robin Appelman
f2798bf0d4 fix: improve handling of newFolder race condition handling
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-05-13 11:59:28 +00:00
Robin Appelman
fa135d9535 fix: throw a better error if we can't get the encrypted header size
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-05-12 14:14:59 +02:00
Robin Appelman
0fe56ce669 feat: add more encryption checks to info:file
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-05-12 11:27:29 +00:00
Robin Appelman
87a4bff4ee chore: cleanup leftover debug statement
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-05-12 11:59:53 +02:00
Robin Appelman
eade5703ba fix: get object size from stream where possible
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-05-12 11:59:47 +02:00
Robin Appelman
6632669157 fix: don't perform the extra buffering in s3 stream write when the stream size is known
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-05-12 11:58:34 +02:00
Robin Appelman
b1ad63666f fix: use php://temp instead of php://memory for multi-part upload buffer
this should reduce potential memory issues if the limit is set very high

Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-05-12 11:58:23 +02:00
Robin Appelman
697a20ef2a fix: restore updated encrypted version when copying versions
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-05-08 18:57:17 +00:00
Ferdinand Thiessen
832f79ac93
chore: apply code style
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2025-04-30 19:04:59 +02:00
Côme Chilliet
3646da59f3 fix: Fix copying to the root of another mountpoint
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-04-28 10:23:21 +00:00
Anna Larch
cae5c4f02b fix(objectstorage): add retry attempts to S3 connection
Signed-off-by: Anna Larch <anna@nextcloud.com>
2025-04-23 18:40:07 +00:00
Louis
e08afe0849
Merge pull request #52184 from nextcloud/backport/51020/stable30 2025-04-17 11:38:34 +02:00
Louis Chemineau
9bed21a8d7 fix: Transfer ownership with S3 as primary
When using S3 as primary storage, transferring ownership with the `--move` option fail with the following error:

`SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '8-45b963397aa40d4a0063e0d85e4fe7a1' for key 'fs_storage_path_hash'`

The `--move` option moves the entire home folder from one account to another.
The error means that the move failed because the destination folder already exist in `oc_filecache`.

- With S3 as primary storage, folders only exists as entries in `oc_filecache`.
- With S3 as primary storage, `moveFromStorage(...)` only moves the cache entry, as nothing needs to be moved on disk. This cache move does not delete potentially pre-existing destination folder.
- With Local storage, `moveFromStorage(...)` calls `rename(...)` which delete pre-existing folder.

- `transfer(...)`: 687a4d9ac7/apps/files/lib/Service/OwnershipTransferService.php (L112)
- `oneTimeUserSetup(...)`: 687a4d9ac7/lib/private/Files/SetupManager.php (L261-L262)
- `mkdir(...)`: 687a4d9ac7/lib/private/Files/ObjectStore/ObjectStoreStorage.php (L91-L135)
- `moveFromStorage(...)`: 687a4d9ac7/lib/private/Files/ObjectStore/ObjectStoreStorage.php (L635-L636)

Delete pre-existing folder in `moveFromStorage(...)`

Signed-off-by: Louis Chemineau <louis@chmn.me>
2025-04-16 16:18:42 +02:00
Robin Appelman
a4d2af5155 fix: only do cache copy in updater if the parent folder should be in cache
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-04-15 18:05:36 +02:00
Julius Knorr
d38a431030 fix: Catch old cached paths and fetch the new one
Signed-off-by: Julius Knorr <jus@bitgrid.net>
2025-04-08 12:44:02 +00:00
Julius Knorr
af1112dac3 fix: Proper order for checking path prefix for getting file by id from cache
Signed-off-by: Julius Knorr <jus@bitgrid.net>
2025-04-08 12:44:01 +00:00
Ferdinand Thiessen
d0402dee06 fix(IFilenameValidator): correctly handle case insensitivity
- forbidden names and forbidden base names are case **insensitive**
  so we need to check all lowercase here.
- add test that config value is also read case insensitive.

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2025-03-24 11:46:43 +00:00
Git'Fellow
552c5e8cef fix(files): Make sure file pointer exists
Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
2025-03-17 16:04:47 +00:00
Louis
acf19f7880
Revert "Revert "[stable30] fix: Handle copy of folders containing live photos""
Signed-off-by: Louis Chemineau <louis@chmn.me>
2025-03-05 13:45:23 +01:00
Marcel Müller
c6ca459b40 fix: No IFactory in constructor
Signed-off-by: Marcel Müller <marcel-mueller@gmx.de>
2025-03-05 11:34:03 +00:00
Joas Schilling
259919e9fd fix(files): Don't do session related work in the constructor of the View
Signed-off-by: Joas Schilling <coding@schilljs.com>
2025-03-05 11:34:03 +00:00
Andy Scherzinger
682c8e6a61
Merge pull request #50796 from nextcloud/backport/50781/stable30
[stable30] perf(files): faster query to fetch incomplete directories
2025-02-17 19:15:58 +01:00
Robin Appelman
33fb176651 fix: make locked exception path relative to the view
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-02-15 14:42:51 +01:00
Benjamin Gaussorgues
765b4921ff
perf(files): faster query to fetch incomplete directories
Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
2025-02-14 10:57:26 +01:00
Andy Scherzinger
7bf1126b1f
Merge pull request #49657 from nextcloud/backport/48769/stable30
[stable30] Fix incorrect permissions when copying shared files
2025-02-14 10:30:46 +01:00
Louis Chemineau
a663b3e0cd 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>
2025-02-13 23:35:59 +00:00
Robin Appelman
9f1666ef3d fix: use scan_permissions when copying cache items
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-02-13 18:17:31 +01:00
Robin Appelman
5c9a3a2423 fix: store unmaked source permissions as scan_permissions when loading share cache items
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-02-13 18:17:31 +01:00
Robin Appelman
da334737e4 fix: rework move into object store to better preserve fileids
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-02-13 17:31:51 +01:00
Robin Appelman
e85d5df5f0 fix: preserve fileid when moving from objectstore to non-objectstore
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-02-13 17:31:51 +01:00
Robin Appelman
9fd7dfd1c2 fix: ensure source folder is removed from cache when moving to objectstore
otherwise this causes confusion down the line as it's contents will be moved to the new cache

Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-02-13 17:31:51 +01:00
Andy Scherzinger
094ea5c885
Merge pull request #50761 from nextcloud/backport/50324/stable30
[stable30] fix: don't use cached root info from shared cache if the watcher has detected an update
2025-02-13 16:43:50 +01:00
Robin Appelman
3bfcd8371b
fix: don't use cached root info from shared cache if the watcher has detected an update
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-02-11 16:21:37 +01:00
John Molakvoæ
86408a5be7 fix: psalm and OCP @since declarations
Co-authored-by: Ferdinand Thiessen <opensource@fthiessen.de>
Signed-off-by: John Molakvoæ <skjnldsv@users.noreply.github.com>
2025-02-06 15:15:41 +00:00
skjnldsv
80a4cb586f fix: make sure we process mime extensions as string
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
2025-02-06 15:15:41 +00:00
Robin Appelman
5d094feee0
fix: explicitly ignore nested mounts when transfering ownership
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-02-05 09:09:04 +01:00