Commit graph

1773 commits

Author SHA1 Message Date
Côme Chilliet
e2861b42d1 fix(encryption): Correctly handle file opening and copying failures
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-07-03 16:03:19 +02:00
Kent Delante
f40d14abac fix(s3): retry failed multipart uploads with decreased concurrency
Signed-off-by: Kent Delante <kent.delante@proton.me>
2025-06-20 18:24:16 +08:00
Daniel Calviño Sánchez
019b535868 fix(ObjectStore): Make S3 "connect_timeout" option configurable
The hardcoded connection timeout of 5 seconds may not be enough in some
cases, so now it is got from the ObjectStore arguments in Nextcloud
configuration, falling back to 5 if not set.

The connection timeout is set in seconds, but decimal precision can be
used for subsecond accuracy (for example, 4.2 for 4200 milliseconds).

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2025-06-17 03:30:55 +00:00
Joas Schilling
efb2a9376b fix: Run cleanByMoundId query on all shards
Signed-off-by: Joas Schilling <coding@schilljs.com>
2025-06-08 09:28:02 +02:00
Robin Appelman
edfb7b2393 perf: set the folder size in the same query as we create it
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-06-02 09:56:29 +00:00
Louis Chemineau
9d26571eb2 fix(S3): Use original folder size during copy
This prevent having copied folders with a wrongly set size of 0KB.

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

Signed-off-by: Louis Chemineau <louis@chmn.me>
2025-06-02 09:56:29 +00:00
Jonas
ed492c5c70 fix(node): emit hooks on Node::copy()
When calling `Files\Node\Node::copy()`, `Files\View::copy()` gets called,
but `Files\View::fakeRoot` is empty so the hooks are not emitted if no
path is given to `Files\View::shouldEmitHooks()`.

This results in node-related events like `NodeCopiedEvent` not being
fired when copying files via `Files\Node\Node::copy()`.

`Files\View::shouldEmitHooks()` is given a path as parameter in almost
all places except when called from the `copy()` function. This commit
changes it and passes the copy target path.

Fixes: nextcloud/collectives#1756

Signed-off-by: Jonas <jonas@freesources.org>
2025-05-28 11:50:11 +00:00
Elizabeth Danzberger
52ae766a8e feat: only load template fields when requested
Signed-off-by: Elizabeth Danzberger <lizzy7128@tutanota.de>
2025-05-26 18:03:24 +02:00
Kate
76d37a37f6
Merge pull request #52987 from nextcloud/backport/50157/stable31 2025-05-26 08:27:43 +02:00
Andy Scherzinger
b3d1fac31e
Merge pull request #52883 from nextcloud/backport/52873/stable31
[stable31] fix: improve error message when cache rename source can't be found
2025-05-25 20:16:11 +02:00
Robin Appelman
4dba5e141b fix: improve error message when cache rename source can't be found
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-05-25 18:38:42 +02:00
provokateurin
29d69826b6 feat(UserMountCache): Emit events for added, removed and updated mounts
Signed-off-by: provokateurin <kate@provokateurin.de>
2025-05-25 16:46:53 +02:00
provokateurin
6517f0527d fix(SetupManager): Include home and root providers when registering mounts
Signed-off-by: provokateurin <kate@provokateurin.de>
2025-05-25 16:42:35 +02:00
Robin Appelman
780766b63c fix: keep IObjectStoreMetaData in private namespace for backports
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-05-16 10:41:27 +02:00
Robin Appelman
f0cab800ab feat: add command to list objects
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-05-16 10:41:27 +02:00
Robin Appelman
a324dbec2e feat: add command to get object metadata
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-05-16 10:41:27 +02:00
Kate
3f2fee08ca
Merge pull request #52823 from nextcloud/backport/52775/stable31 2025-05-16 10:01:43 +02:00
Robin Appelman
465486e335 fix: fix unjailedroot of nested jails if there are other wrappers in between
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-05-15 14:57:05 +02:00
Robin Appelman
66362e6b51 test: add test for nested cache jail unjailedroot
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-05-15 14:57:05 +02:00
Robin Appelman
54338f6d72 fix: create mountpoint folder even if the user has a quota of 0
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-05-15 14:56:10 +02:00
Robin Appelman
4271753fc2
Merge pull request #52790 from nextcloud/backport/52441/stable31
[stable31] fix: better error message when trying to scan a folder that is already being scanned
2025-05-15 14:11:14 +02:00
Robin Appelman
b8cbd0f41b
Merge pull request #52764 from nextcloud/backport/52706/stable31
[stable31] feat: add more encryption checks to info:file
2025-05-15 14:05:32 +02:00
Robin Appelman
ef2e308aa3
Merge pull request #52762 from nextcloud/backport/52707/stable31
[stable31] fix: throw a better error if we can't get the encrypted header size
2025-05-15 14:03:03 +02:00
Robin Appelman
a4a5bcaacb fix: better error message when trying to scan a folder that is already being scanned
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-05-13 14:06:15 +02:00
Robin Appelman
d1ddfd220f fix: improve handling of newFolder race condition handling
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-05-13 11:59:05 +00:00
Robin Appelman
1c5658cd33 feat: add more encryption checks to info:file
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-05-12 11:27:33 +00:00
Robin Appelman
7e454b2d96 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 11:27:21 +00:00
Anna Larch
d393e98c9e fix(objectstorage): add retry attempts to S3 connection
Signed-off-by: Anna Larch <anna@nextcloud.com>
2025-04-23 18:40:23 +00:00
Julius Knorr
4120493856
Merge pull request #52039 from nextcloud/backport/52008/stable31
[stable31] fix: Proper order for checking path prefix for getting file by id from cache
2025-04-22 08:45:04 +02:00
Louis Chemineau
27ed921ad5 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 10:19:17 +02:00
Julius Knorr
e5209d4076 fix: Catch old cached paths and fetch the new one
Signed-off-by: Julius Knorr <jus@bitgrid.net>
2025-04-08 20:08:50 +02:00
Julius Knorr
49f2228570 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 20:08:50 +02:00
Ferdinand Thiessen
45cd76224e fix(cache): always require updates if mtime is null
- Resolves https://github.com/nextcloud/server/issues/51941

Due to strong typings we introduced the parameter needs to be an
integer. Previously it was `null` which was equal to `0`.
So if there is no storage mtime we need to update the cache.

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2025-04-07 08:17:16 +00:00
Ferdinand Thiessen
ef1a73a8dc 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-28 20:54:23 +01:00
Git'Fellow
55f50b485f fix(files): Make sure file pointer exists
Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
2025-03-17 16:05:04 +00:00
Marcel Müller
44e89610ed fix: No IFactory in constructor
Signed-off-by: Marcel Müller <marcel-mueller@gmx.de>
2025-03-05 11:34:02 +00:00
Joas Schilling
93f039fb96 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:02 +00:00
Benjamin Gaussorgues
d056e4dc74 perf(files): faster query to fetch incomplete directories
Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
2025-02-13 14:24:44 +00:00
Robin Appelman
5eac86afec 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 20:35:46 +01:00
Robin Appelman
e813f3d605 fix: make locked exception path relative to the view
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-02-11 16:29:43 +00:00
John Molakvoæ
1946fdf80d 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-09 21:09:12 +01:00
skjnldsv
63d9a11575 fix: make sure we process mime extensions as string
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
2025-02-09 21:09:12 +01:00
Richard Steinmetz
936ef804cd fix(s3): treat empty sse_c_key as not set
Co-authored-by: Christian Becker <christian@dabecka.de>
Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
2025-01-29 17:35:52 +00:00
Ferdinand Thiessen
26c93519f2 fix: Harden files scanner for invalid null access
Co-authored-by: Ferdinand Thiessen <opensource@fthiessen.de>
Co-authored-by: Kate <26026535+provokateurin@users.noreply.github.com>
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2025-01-28 19:49:03 +00:00
Louis Chemineau
5b2af8b4c0 fix: Metadata field search
Signed-off-by: Louis Chemineau <louis@chmn.me>
2025-01-25 09:44:50 +00:00
Git'Fellow
dcde6d8d74
fix(TemplateManager): Remove warning message
Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
2025-01-20 13:05:28 +01:00
John Molakvoæ
e5dceaf287
fix: php lint extra tab fix
Co-authored-by: Ferdinand Thiessen <opensource@fthiessen.de>
Signed-off-by: John Molakvoæ <skjnldsv@users.noreply.github.com>
2025-01-17 21:37:39 +01:00
skjnldsv
abd3cb60fc fix(files): more conversion tests and translate error messages
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
2025-01-17 18:22:58 +01:00
Elizabeth Danzberger
14976390ff
chore: remove unnecessary method
Signed-off-by: Elizabeth Danzberger <lizzy7128@tutanota.de>
2025-01-16 15:25:15 -05:00
Elizabeth Danzberger
f9adb006b0
fix: prevent missing target file extension
Signed-off-by: Elizabeth Danzberger <lizzy7128@tutanota.de>
2025-01-16 15:23:38 -05:00