aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Files
Commit message (Collapse)AuthorAgeFilesLines
* fix: misc code fixes around db shardingsharding-code-fixesRobin Appelman2024-09-091-1/+1
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* fix(files): Never return a null ETag in DAVprovokateurin2024-09-093-10/+3
| | | | Signed-off-by: provokateurin <kate@provokateurin.de>
* chore(storage): refactor some code portionsGit'Fellow2024-09-061-30/+16
| | | | | | | | Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com> chore: revert portion Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
* Merge pull request #47784 from nextcloud/fix/file-infoFerdinand Thiessen2024-09-061-9/+5
|\ | | | | fix(FileInfo): correctly implement `\ArrayAccess::offsetGet`
| * fix(FileInfo): correctly implement `\ArrayAccess::offsetGet`Ferdinand Thiessen2024-09-061-9/+5
| | | | | | | | | | | | | | We are targetting PHP 8.1+, since PHP 8.0 `offsetGet` has the `mixed` types for `offset` and return value. So this adds the types to correctly implement the interface. Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
* | fix(files): Check if the target path is a descendant of the shared folder pathGit'Fellow2024-09-051-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
* chore: adjust code to adhere to coding standardAnna Larch2024-09-051-1/+1
| | | | Signed-off-by: Anna Larch <anna@nextcloud.com>
* Merge pull request #47417 from nextcloud/fix/files/create-mountpoint-parentsKate2024-09-041-0/+9
|\
| * fix(files): Create non-existent parents of mountpointsprovokateurin2024-08-221-0/+9
| | | | | | | | Signed-off-by: provokateurin <kate@provokateurin.de>
* | Merge pull request #47546 from nextcloud/fix/files-view-error-messagesAndy Scherzinger2024-08-291-3/+3
|\ \ | | | | | | fix: Adjust filename validation messages
| * | fix: Adjust filename validation messagesFerdinand Thiessen2024-08-271-3/+3
| | | | | | | | | | | | Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
* | | fix: Do not fail to get internal path on NonExistingFile/NonExistingFolderJulius Härtl2024-08-292-0/+16
| | | | | | | | | | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* | | 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>
* | | 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>
* | Merge pull request #46013 from ↵Julius Härtl2024-08-261-0/+25
|\ \ | | | | | | | | | | | | nextcloud/obj-store-move-from-storage-preserve-fileid fix: write object to the correct urn when moving from another storage to object store
| * | fix: write object to the correct urn when moving from another storage to ↵Robin Appelman2024-08-231-0/+25
| |/ | | | | | | | | | | object store Signed-off-by: Robin Appelman <robin@icewind.nl>
* / style: update codestyle for coding-standard 1.2.3Daniel Kesselberg2024-08-2534-86/+86
|/ | | | Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
* fix: `FilenameValidator::isForbidden` should only check forbidden filesFerdinand Thiessen2024-08-211-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 branch 'master' into jr-readdir-false-falseJohn Molakvoæ2024-08-16123-3642/+3320
|\ | | | | Signed-off-by: John Molakvoæ <skjnldsv@users.noreply.github.com>
| * 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>