Commit Graph

1629 Commits (a4e2a7bb7bca8a374dd5d644c0c191dedfca9201)

Author SHA1 Message Date
Daniel Calviño Sánchez 1a98cd52b5 fix: Fix copying or moving from shared groupfolders
When copying or moving between two local storages the source path (on
disk) to copy or move from is got from the unjailed path of the source
storage. However, if the source storage has more than one jail getting
the unjailed path resolves the most external jail, but the source path
needs to be got from the most internal jail instead (the one closer to
the local storage).

This can happen, for example, with a shared groupfolder: in that case
there is an external jail for the shared storage, and one internal jail
for the groupfolder storage wrapped by the shared storage.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2024-10-29 15:02:49 +07:00
Julius Knorr 643e9ffb06 fix: Allow overriding shouldApplyQuota check from child classes
Signed-off-by: Julius Knorr <jus@bitgrid.net>
2024-10-28 09:46:45 +07:00
Benjamin Gaussorgues 8290de3b93
Merge pull request #48077 from nextcloud/backport/47852/stable30 2024-10-02 10:43:41 +07:00
Joas Schilling abe82432cb
fix(querybuilder): Fix boolean type so that oracle handles boolean well
Signed-off-by: Joas Schilling <coding@schilljs.com>
2024-09-25 08:40:53 +07:00
Kate 61f3a09dcd
Merge pull request #48233 from nextcloud/backport/48222/stable30 2024-09-20 23:02:25 +07:00
Kate ae7241f6c8
Merge pull request #48221 from nextcloud/backport/30/fix_move_on_same_bucket 2024-09-20 10:06:14 +07:00
Robin Appelman e8c8ab58f7 perf: reuse cache info we already have when moving to object store
Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-09-20 07:50:23 +07:00
Christoph Fiehe 82be489f53 perf(ObjectStoreStorage): Improve (slow) move on same object bucket
This commit fixes the issue #47856. When you upload a file into a group folder and when you use a single S3 bucket as primary storage, the final move operation hangs for a long time. In the background, Nextcloud initiates a copy-delete sequence from the bucket into the bucket, with causes a lot unnecessary overhead. Nextcloud thinks that the file must be imported to another storage and does not recognize that everything is done on the same object bucket. In that case, the import step can be completely skipped, which saves time, network bandwidth and reduces the load on the object storage.

The behavior improves a lot with https://github.com/nextcloud/server/pull/46013. However, there are still some put messages that are being sent to the object storage when you use an object storage as primary storage and upload files into a group folder.

Co-authored-by: Kate <26026535+provokateurin@users.noreply.github.com>
Signed-off-by: Christoph Fiehe <c.fiehe@eurodata.de>
2024-09-19 18:53:36 +07:00
Robin Appelman dd68f678b2 fix: ensure parent folder exists when writing a file to object storage
Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-09-19 13:59:08 +07:00
Robin Appelman 7b1b5526b7 fix: verify that parent exists in cache when inserting
Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-09-19 13:59:08 +07:00
Robin Appelman 1e03bd5d18 fix: fix object store id for test object store
Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-09-19 13:59:08 +07:00
Robin Appelman e8c7216d5b fix: cleanup objectstore file_put_content
Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-09-19 13:59:08 +07:00
Robin Appelman 9b07b7d9c1 fix: create intermediate directories for objectstore moveFromStorage
Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-09-19 13:59:08 +07:00
Robin Appelman 5bcd74ae87 fix: get source file before moving the cache item in objectstore moveFromStorage
Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-09-19 13:59:08 +07:00
John Molakvoæ 2308294a68 chore: improve hash_file php usage in Local Storage
Co-authored-by: Ferdinand Thiessen <opensource@fthiessen.de>
Signed-off-by: John Molakvoæ <skjnldsv@users.noreply.github.com>
2024-09-16 17:08:10 +07:00
Louis Chemineau 7c99850958 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 17:08:10 +07:00
Robin Appelman 914e8f9ce2 fix: misc code fixes around db sharding
Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-09-16 12:19:20 +07:00
Andy Scherzinger fa355386f7
Merge pull request #47796 from nextcloud/backport/47756/stable30
[stable30] fix(files): Check if target path is a descendant of the shared folder
2024-09-15 21:25:30 +07:00
provokateurin 69b01a265c fix(S3ConfigTrait): Allow proxy field to take false
Signed-off-by: provokateurin <kate@provokateurin.de>
2024-09-15 17:19:40 +07:00
provokateurin eb3c1a2bee fix(Storage\Local): Do not call getSourcePath() on SplFileInfo
Signed-off-by: provokateurin <kate@provokateurin.de>
2024-09-15 14:53:34 +07:00
provokateurin 886561761a fix(files): Adjust Cache::searchQuery() parameter name to match interface
Signed-off-by: provokateurin <kate@provokateurin.de>
2024-09-13 17:02:33 +07:00
Andy Scherzinger 0fc355be58
Merge pull request #47874 from nextcloud/backport/47853/stable30
[stable30] fix: make swift connect exception message more informative
2024-09-10 20:58:06 +07:00
Robin Appelman 7206e5e086 fix: make swift connect exception message more informative
Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-09-10 14:47:23 +07:00
Julius Knorr a137eebb82 fix: Only write once to template instead of create/copy
Signed-off-by: Julius Knorr <jus@bitgrid.net>
2024-09-10 08:07:26 +07:00
Git'Fellow 2bb8c023c2 fix(files): Check if the target path is a descendant of the shared folder path
Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>

fix: tests

Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>

fix: fix tests

Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>

fix: add tests

Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>

fix: tests
2024-09-06 02:00:43 +07:00
Robin Appelman 05f79f23cd fix: write object to the correct urn when moving from another storage to object store
Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-09-04 23:17:04 +07:00
provokateurin b9aaa9f2e0 fix(files): Create non-existent parents of mountpoints
Signed-off-by: provokateurin <kate@provokateurin.de>
2024-09-04 18:04:13 +07:00
Julius Härtl 2e312e47f4
fix: Do not fail to get internal path on NonExistingFile/NonExistingFolder
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2024-09-03 00:40:03 +07:00
Ferdinand Thiessen 6ea52ed218 fix: Adjust filename validation messages
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2024-08-30 14:48:23 +07:00
Ferdinand Thiessen bcd26323c1
fix: Also validate parent path in `verifyPath`
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2024-08-28 20:24:03 +07:00
Ferdinand Thiessen ef3bd03849
fix: Allow read-only filename validation to allow reading files
Needed to read files with the "Windows compatibility" feature.

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2024-08-28 20:23:54 +07:00
Ferdinand Thiessen 183fcef39b
fix: Renaming does not need update but delete permissions
Renaming is basically copy + delete (a move), so no need to update permissions.
Especially if the node is in a invalid directory the node should be moveable but not editable.

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2024-08-28 20:23:50 +07:00
Louis Chemineau e5a8f996bd chore: Apply php:cs recommendations
Signed-off-by: Louis Chemineau <louis@chmn.me>

[skip ci]
2024-08-28 14:54:14 +07:00
Robin Appelman 693ee5ea0f fix: hint storage id in more places
Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-08-28 14:54:14 +07:00
Robin Appelman 82d7eaf80a feat: implement distributing partitioned queries over multiple shards
Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-08-28 14:54:14 +07:00
Ferdinand Thiessen 1e49c83556 fix: `FilenameValidator::isForbidden` should only check forbidden files
And not forbidden basenames as this is used for different purposes.

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2024-08-22 08:51:58 +07:00
Robin Appelman fff198657f fix: use mountpoint from storage to find the encryption keys
Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-08-20 14:24:43 +07:00
Robin Appelman ece54cf956 feat: store the mountpoint of storages in the mount options
Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-08-20 14:24:43 +07:00
Andy Scherzinger 609fa7d5db
Merge pull request #47044 from nextcloud/fix/accept-several-mounts-in-encryption
fix(encryption): Fix mountpoint check to accept if several are found
2024-08-07 20:58:19 +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
Robin Appelman eb4fb994cf
fix: ensure array returned from getMountsForFileId is continious
Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-08-02 17:22:33 +07:00
Christopher Ng 572361f498 fix(files): Fix incorrect keys by reindexing
Signed-off-by: Christopher Ng <chrng8@gmail.com>
2024-08-01 09:14:44 +07:00
Ferdinand Thiessen 21f558b12b
Merge pull request #46379 from nextcloud/fix/folder-search-owner
fix: `OCP\Files\Node\Folder::search` was not setting the owner
2024-07-30 13:04:15 +07:00
withbest dd08f93202 chore: fix some comments
Signed-off-by: withbest <seekseat@outlook.com>
2024-07-29 14:43:27 +07:00
Dennis Verspuij 181aecad4c fix: Release directory iterator and thereby its potential directory lock prior to deleting a directory, to avoid e.g. "Text file busy" error with VirtualBox shared folder storage
Signed-off-by: Dennis Verspuij <6680484+dennisverspuij@users.noreply.github.com>
2024-07-27 16:37:16 +07:00
Andy Scherzinger 4f2a29adf9
Merge pull request #46672 from nextcloud/fix/preview-invalid-id
Avoid using partial file info as valid one
2024-07-25 19:37:30 +07:00
Elizabeth Danzberger efe03ee690
feat: Add support for filling fields to backend components
Signed-off-by: Elizabeth Danzberger <lizzy7128@tutanota.de>
2024-07-25 11:11:40 +07:00
Elizabeth Danzberger 05ed5aa230
fix: Emit new `BeforeGetTemplates` event
Signed-off-by: Elizabeth Danzberger <lizzy7128@tutanota.de>
2024-07-25 11:11:38 +07:00
Julius Härtl 2b0bc8b310 fix: Do not return partial file info if we have a cache entry
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2024-07-22 22:32:34 +07:00
Ferdinand Thiessen 12796c3ae7
fix: FileInfo from `View` should have the correct name of a mountpoint
If a mountpoint is returned from a `View` the name must match the view scoped name
and not the global name.
For example group folders have a name like `1` or `2` (the ID),
but the name of the FileInfo returned fro mthe View should be the mount point name,
like `First groupfolder` or similar.

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2024-07-22 22:01:12 +07:00