aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Files
Commit message (Collapse)AuthorAgeFilesLines
* fix(files): Check if the target path is a descendant of the shared folder pathbackport/47756/stable30Git'Fellow2024-09-061-1/+2
| | | | | | | | | | | | | | | | | | 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
* fix: write object to the correct urn when moving from another storage to ↵Robin Appelman2024-09-041-0/+25
| | | | | | object store Signed-off-by: Robin Appelman <robin@icewind.nl>
* fix(files): Create non-existent parents of mountpointsprovokateurin2024-09-041-0/+9
| | | | Signed-off-by: provokateurin <kate@provokateurin.de>
* fix: Do not fail to get internal path on NonExistingFile/NonExistingFolderJulius Härtl2024-09-032-0/+16
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* fix: Adjust filename validation messagesFerdinand Thiessen2024-08-301-3/+3
| | | | Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
* fix: Also validate parent path in `verifyPath`Ferdinand Thiessen2024-08-282-3/+17
| | | | Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
* fix: Allow read-only filename validation to allow reading filesFerdinand Thiessen2024-08-281-1/+12
| | | | | | Needed to read files with the "Windows compatibility" feature. Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
* fix: Renaming does not need update but delete permissionsFerdinand Thiessen2024-08-281-5/+8
| | | | | | | 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>
* chore: Apply php:cs recommendationsLouis Chemineau2024-08-281-9/+9
| | | | | | Signed-off-by: Louis Chemineau <louis@chmn.me> [skip ci]
* fix: hint storage id in more placesRobin Appelman2024-08-281-2/+5
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* feat: implement distributing partitioned queries over multiple shardsRobin Appelman2024-08-281-4/+92
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* fix: `FilenameValidator::isForbidden` should only check forbidden filesFerdinand Thiessen2024-08-221-9/+18
| | | | | | And not forbidden basenames as this is used for different purposes. Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
* fix: use mountpoint from storage to find the encryption keysRobin Appelman2024-08-201-3/+3
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* feat: store the mountpoint of storages in the mount optionsRobin Appelman2024-08-201-2/+3
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Merge pull request #47044 from nextcloud/fix/accept-several-mounts-in-encryptionAndy Scherzinger2024-08-071-1/+1
|\ | | | | fix(encryption): Fix mountpoint check to accept if several are found
| * fix(encryption): Fix mountpoint check to accept if several are foundCôme Chilliet2024-08-051-1/+1
| | | | | | | | | | | | | | 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>
* | fix: ensure array returned from getMountsForFileId is continiousRobin Appelman2024-08-021-2/+2
| | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* | fix(files): Fix incorrect keys by reindexingChristopher Ng2024-08-011-2/+2
| | | | | | | | Signed-off-by: Christopher Ng <chrng8@gmail.com>
* | Merge pull request #46379 from nextcloud/fix/folder-search-ownerFerdinand Thiessen2024-07-301-1/+24
|\ \ | |/ |/| fix: `OCP\Files\Node\Folder::search` was not setting the owner
| * fix: `OCP\Files\Node\Folder::search` was not setting the ownerFerdinand Thiessen2024-07-111-1/+24
| | | | | | | | | | | | The owner was not set on the file info causing e.g. webdav searches to never return the known owner. Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
* | chore: fix some commentswithbest2024-07-291-1/+1
| | | | | | | | Signed-off-by: withbest <seekseat@outlook.com>
* | fix: Release directory iterator and thereby its potential directory lock ↵Dennis Verspuij2024-07-271-0/+1
| | | | | | | | | | | | 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>
* | Merge pull request #46672 from nextcloud/fix/preview-invalid-idAndy Scherzinger2024-07-251-3/+4
|\ \ | | | | | | Avoid using partial file info as valid one
| * | fix: Do not return partial file info if we have a cache entryJulius Härtl2024-07-221-3/+4
| | | | | | | | | | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* | | feat: Add support for filling fields to backend componentsElizabeth Danzberger2024-07-251-2/+3
| | | | | | | | | | | | Signed-off-by: Elizabeth Danzberger <lizzy7128@tutanota.de>
* | | fix: Emit new `BeforeGetTemplates` eventElizabeth Danzberger2024-07-251-0/+3
| | | | | | | | | | | | Signed-off-by: Elizabeth Danzberger <lizzy7128@tutanota.de>
* | | fix: FileInfo from `View` should have the correct name of a mountpointFerdinand Thiessen2024-07-221-0/+4
|/ / | | | | | | | | | | | | | | | | | | 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>
* | refactor: Migrate some legacy and core functions to `IFilenameValidator`Ferdinand Thiessen2024-07-191-0/+6
| | | | | | | | Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
* | fix: make batch propagator work with sharding restrictionsRobin Appelman2024-07-171-4/+4
| | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* | fix: make usermountcache compatible with shardingRobin Appelman2024-07-171-5/+5
| | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* | fix: make joining on tags in search queries work with shardingRobin Appelman2024-07-171-1/+0
| | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* | fix: always set storage id in Cache::getRobin Appelman2024-07-171-2/+2
| | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* | fix: add set storage id for more cache queriesRobin Appelman2024-07-171-0/+5
| | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* | refactor: Migrate filename validation logic from `Storage` to ↵Ferdinand Thiessen2024-07-163-68/+35
| | | | | | | | | | | | `FilenameValidator` Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
* | feat: Add `forbidden_filename_basenames` config optionFerdinand Thiessen2024-07-151-23/+48
| | | | | | | | | | | | | | | | This allows to configure forbidden filenames (the full filename like `.htaccess`) and also forbidden basenames like `com0` where `com0`, `com0.txt` and `com0.tar.gz` will match. We need this as only using basenames was too restrictive and will cause problems on some systems when updating. Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
* | feat: add base class for extending the query builderRobin Appelman2024-07-124-18/+7
|/ | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* feat: Add `IFilenameValidator` to have one consistent place for filename ↵Ferdinand Thiessen2024-07-091-0/+249
| | | | | | | | validation Co-authored-by: Ferdinand Thiessen <opensource@fthiessen.de> Co-authored-by: Côme Chilliet <91878298+come-nc@users.noreply.github.com> Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
* fix(s3): Don't wait indefinitely for S3 to returnGit'Fellow2024-07-051-29/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com> fix: lint Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com> fix: use AwsException Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com> fix: Throw on connection failure Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com> fix: Wrap all in try catch block Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com> fix: use RequestTimeout error message Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com> log: use OCP Server class Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com> fix: Handle connect timeout only Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com> fix: Handle errors more generically Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
* fix: also use optimized getFirstNodeyIdInPath for Folder::getFirstNodeByIdRobin Appelman2024-06-201-1/+1
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* fix(S3): Adjust usage of guzzle promiseFerdinand Thiessen2024-06-162-3/+3
| | | | | | `Promise\promise_for` was deprecated and is now removed and replaced with the static API (`Create::promiseFor`). Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
* Merge pull request #45172 from nextcloud/test-scanner-no-transactionsRobin Appelman2024-06-131-1/+5
|\ | | | | feat: add option to disable scanner transactions
| * feat: add option to disable scanner transactionsRobin Appelman2024-05-031-1/+5
| | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* | fix: get child ids for folder in a separate query during moveRobin Appelman2024-06-131-4/+21
| | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* | fix(ObjectStore): handle empty S3 hostnameJosh2024-06-121-1/+1
| | | | | | | | | | | | | | | | Fixes #45637 The support for s3-accelerate added in #44496 introduced a regression in AWS S3 environments when `hostname` is blank (which is a valid configuration w/ AWS since the hostname gets auto-generated). Signed-off-by: Josh <josh.t.richards@gmail.com>
* | fix(files): Use isRetryable to catch retryable exceptionsLouis Chemineau2024-06-111-2/+6
| | | | | | | | Signed-off-by: Louis Chemineau <louis@chmn.me>
* | Merge pull request #45413 from nextcloud/createIfNotExistsFerdinand Thiessen2024-05-301-1/+1
|\ \ | | | | | | fix(files): Try to create dir only if it not exists
| * | Try create folder first and check if it exists afterGit'Fellow2024-05-301-1/+1
| | | | | | | | | | | | Co-authored-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com> Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
| * | fix(files): Try to create dir only if it not existsGit'Fellow2024-05-301-1/+1
| | | | | | | | | Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
* | | Merge branch 'master' into refactor/OC-Server-getHTTPClientServiceJohn Molakvoæ2024-05-30122-3383/+2719
|\| | | | | | | | Signed-off-by: John Molakvoæ <skjnldsv@users.noreply.github.com>
| * | Merge pull request #45014 from nextcloud/forbid-moving-subfolderRobin Appelman2024-05-271-0/+6
| |\ \ | | | | | | | | fix: forbid moving a folder into a subfolder of itself