Commit graph

1759 commits

Author SHA1 Message Date
Anna Larch
49baa914cf fix(objectstorage): add retry attempts to S3 connection
Signed-off-by: Anna Larch <anna@nextcloud.com>
2025-04-23 12:15:06 +02:00
Louis
f8391e60ce
Merge pull request #51020 from nextcloud/artonge/fix/transfer_ownership 2025-04-14 16:14:45 +02:00
Julius Knorr
7ff80cc016
fix: Catch old cached paths and fetch the new one
Signed-off-by: Julius Knorr <jus@bitgrid.net>
2025-04-08 09:17:35 +02:00
Julius Knorr
7fa3f89ef9
fix: Proper order for checking path prefix for getting file by id from cache
Signed-off-by: Julius Knorr <jus@bitgrid.net>
2025-04-07 20:47:11 +02:00
Ferdinand Thiessen
3a09acebd2
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-04 13:41:32 +02:00
Robin Appelman
c3f06b370c
feat: add debug logging for adding/removing items from the user mounts cache
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-04-03 17:58:46 +02:00
Ferdinand Thiessen
97ad171d32
refactor(IMimeTypeDetector): use consistent capitalization
- use consistantly `mimeType` as it is called MIME type
- fix issues where implementation and interface had different parameter
  names (this is an issue since PHP has named parameters).

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2025-04-02 13:22:16 +02:00
Louis Chemineau
8fdf2a7eae 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-01 13:53:56 +02:00
Robin Appelman
fcde776683
feat: add command to list objects
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-03-31 14:30:40 +02:00
Robin Appelman
c3bc362f48
feat: add command to get object metadata
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-03-31 14:30:40 +02:00
Robin Appelman
2e9222a29a
feat: add getParentId to ICacheEntry
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-03-28 16:47:07 +01:00
Ferdinand Thiessen
254dd85664
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-21 01:00:58 +01:00
Ferdinand Thiessen
d5efd17942
fix(IMimeTypeDetector): use correct return type
In PHP array keys that are integers are always kept as integer,
meaning the type of the key of `$a = ["1" => "one"]` will be integer not
string.
While are hacks to circumvent this (case std object with string keys to
an assoc. array) those hacks are performance wise awefull and also not
needed as in PHP you can always access that element with `$a[1]` or
`$a["1"]`.

So TL;DR;: do not lie about return types.

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2025-03-18 15:34:28 +01:00
Git'Fellow
dda2148f6f
Merge pull request #51333 from nextcloud/filePointerCheck
fix(files): Make sure file pointer exists
2025-03-17 17:04:24 +01:00
Robin Appelman
8edca98e8e
fix: fix getNodeFromCacheEntryAndMount using relative path
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-03-10 18:19:20 +01:00
Git'Fellow
4d52b185af
fix(files): Make sure file pointer exists
Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
2025-03-07 19:16:30 +01:00
Andy Scherzinger
fdb246c1cf
Merge pull request #50702 from Institutional-Investment-Group/feat/support-aws-session-token9
feat(object_store): Add support for session token (STS) in AWS credentials
2025-03-05 17:40:05 +01:00
Marcel Müller
3391279068 fix: No IFactory in constructor
Signed-off-by: Marcel Müller <marcel-mueller@gmx.de>
2025-03-05 11:04:55 +01:00
Joas Schilling
0522b0373e
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 09:06:16 +01:00
Hector Manuel
12a92a2e8b
Merge branch 'master' into feat/support-aws-session-token 2025-03-04 18:27:54 +01:00
Benjamin Gaussorgues
9bdee76535
perf(files): faster query to fetch incomplete directories
Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
2025-02-13 10:11:02 +01:00
Daniel
90a1aea574
Merge pull request #50498 from nextcloud/bug/48678/restore-dav-error-response-2
Don't rethrow a type error
2025-02-11 17:28:44 +01:00
Robin Appelman
9e1ae74a1c
fix: make locked exception path relative to the view
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-02-11 14:38:27 +01:00
Robin Appelman
2786ca579a
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-06 19:41:43 +01:00
Hector Valcarcel
6b4c859a41 feat(object_store): Add support for session token in AWS credentials
- Pass session token, either null or with value, to the AWS Credentials constructor

Signed-off-by: Hector Valcarcel <hmvalcarcel@gmail.com>
2025-02-06 16:24:19 +01:00
John Molakvoæ
1e30936b78
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:21:18 +01:00
skjnldsv
6baafd82b6 fix: make sure we process mime extensions as string
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
2025-02-05 12:35:41 +01:00
Richard Steinmetz
f1c025dfd3
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-28 22:59:59 +01:00
Ferdinand Thiessen
b48ee2e924
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 20:08:46 +01:00
Ferdinand Thiessen
f33e9a96ae
Merge pull request #50273 from nextcloud/artonge/fix/metadata_field_search
fix: Metadata field search
2025-01-25 10:43:59 +01:00
Louis Chemineau
a635710117
fix: Metadata field search
Signed-off-by: Louis Chemineau <louis@chmn.me>
2025-01-20 14:41:55 +01: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
skjnldsv
7cbcbdc051 fix(files): conversion api simplification and conflict check
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
2025-01-16 18:35:40 +01:00
Elizabeth Danzberger
fdfeb7f265
feat(api): File conversion API
Signed-off-by: Elizabeth Danzberger <lizzy7128@tutanota.de>
2025-01-15 16:38:18 -05:00
Robin Appelman
f20c483513
fix: use proper way to get numeric storage id for mountpoint
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-01-13 17:59:17 +01:00
provokateurin
1e28657093
fix(PathHelper): Remove null bytes when normalizing path
Signed-off-by: provokateurin <kate@provokateurin.de>
2025-01-13 15:21:21 +01:00
Côme Chilliet
c9757586cd
Merge pull request #49903 from nextcloud/encryption-version-version
fix: restore updated encrypted version when copying versions
2025-01-07 16:42:04 +01:00
Robin Appelman
757076af29
fix: explicitly ignore nested mounts when transfering ownership
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-01-06 14:45:35 +01:00
Robin Appelman
d6418fcd99
fix: translate mount move error messages
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-01-03 15:36:38 +01:00
Robin Appelman
16d0363937
fix: improve checks for moving shares/storages into other mounts
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-01-03 15:36:32 +01: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 +01:00
Robin Appelman
54a1ca0da0 fix: don't skip scanner users filesystem if they have a mountpoint at /<user>/files/
Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-12-27 15:18:09 +01:00
Côme Chilliet
08c7001a04 fix: Fix copying to the root of another mountpoint
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2024-12-17 18:24:35 +01:00
provokateurin
4bc0b58c59
fix(View): Catch exceptions when executing mkdir for non-existent parents
Signed-off-by: provokateurin <kate@provokateurin.de>
2024-12-16 16:00:35 +01:00
Daniel Kesselberg
44e4fc5d41
Revert "fix: don't recalculate folder size in Cache::delete if the entry didn't exist"
This reverts commit 5ca9d884d7.

Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2024-12-16 14:03:33 +01:00
Git'Fellow
efa615bb01 fix(TemplateManager): Make sure TemplateFolder is a Folder
Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
2024-12-13 11:27:54 +01:00