aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Files
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #52812 from nextcloud/chore/oc-helper-rmdirrJohn Molakvoæ2025-05-141-2/+6
|\
| * chore: move implementation from OC legacy to OCP\Fileschore/oc-helper-rmdirrFerdinand Thiessen2025-05-141-2/+6
| | | | | | | | | | | | | | | | | | - move implementation to the OCP variant that called the legacy before - add the missing deprecation notice - add missing parameter to align both signatures - use OCP\Files where this method is still used Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
* | Merge pull request #48560 from nextcloud/fix/migrate-encryption-away-from-hooksCôme Chilliet2025-05-141-9/+20
|\ \ | | | | | | feat(encryption): Migrate from hooks to events
| * | fix(encryption): Only prevent cache deletion if target is not object store ↵Côme Chilliet2025-05-131-2/+3
| | | | | | | | | | | | | | | | | | in moveFromStorage Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
| * | fix(encryption): Improve Update class and event listeneningCôme Chilliet2025-05-131-2/+0
| | | | | | | | | | | | | | | | | | to avoid back&forth between path and Node object Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
| * | fix: Preserve file id when moving from object store even if encryption ↵Côme Chilliet2025-05-131-4/+15
| | | | | | | | | | | | | | | | | | wrapper is present Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
| * | fix: Fix mtime preservation when moving a directory across storages with ↵Côme Chilliet2025-05-131-1/+1
| | | | | | | | | | | | | | | | | | encryption registered Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
| * | fix(encryption): Fix filesize for part files in Encryption wrapperCôme Chilliet2025-05-131-2/+3
| |/ | | | | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* | Merge pull request #52775 from nextcloud/nested-jail-rootAndy Scherzinger2025-05-141-5/+8
|\ \ | | | | | | fix unjailedroot of nested jails if there are other wrappers in between
| * | fix: fix unjailedroot of nested jails if there are other wrappers in betweennested-jail-rootRobin Appelman2025-05-131-4/+7
| | | | | | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
| * | test: add test for nested cache jail unjailedrootRobin Appelman2025-05-131-1/+1
| | | | | | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* | | Merge pull request #52800 from nextcloud/debt/noid/simple-file-generic-exceptionKate2025-05-141-2/+8
|\ \ \
| * | | fix: annotate possible exceptionsdebt/noid/simple-file-generic-exceptionDaniel Kesselberg2025-05-131-2/+8
| |/ / | | | | | | | | | | | | | | | File.getContent can throw a GenericFileException since https://github.com/nextcloud/server/pull/37943. Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
* | / chore: deprecate \OC_Helper::canExecutechore/oc-helper-can-execFerdinand Thiessen2025-05-141-2/+5
| |/ |/| | | | | | | | | replace this legacy method with just the IBinaryFinder Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
* | feat(FilenameValidator): allow to sanitize filenamesfeat/ocp-sanitize-filenamesFerdinand Thiessen2025-05-131-0/+37
|/ | | | | | Share the filename sanitizing with the OCP filename validator. Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
* Merge pull request #51920 from nextcloud/newfolder-race-improvementsCôme Chilliet2025-05-131-2/+15
|\ | | | | fix: improve handling of newFolder race condition handling
| * fix: improve handling of newFolder race condition handlingnewfolder-race-improvementsRobin Appelman2025-05-081-2/+15
| | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* | Merge pull request #52706 from nextcloud/info-file-more-encryption-checksRobin Appelman2025-05-121-0/+12
|\ \ | | | | | | feat: add more encryption checks to info:file
| * | feat: add more encryption checks to info:fileinfo-file-more-encryption-checksRobin Appelman2025-05-091-0/+12
| |/ | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* | Merge pull request #52665 from nextcloud/mountpoint-mkdir-quotaRobin Appelman2025-05-122-0/+19
|\ \ | | | | | | fix: create mountpoint folder even if the user has a quota of 0
| * | fix: create mountpoint folder even if the user has a quota of 0mountpoint-mkdir-quotaRobin Appelman2025-05-082-0/+19
| |/ | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* / fix: throw a better error if we can't get the encrypted header sizeencryption-no-header-size-errorRobin Appelman2025-05-091-0/+11
|/ | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Merge pull request #52047 from nextcloud/sub-mount-filter-no-storageKate2025-05-061-2/+1
|\
| * fix: don't construct storage when checking if a sub-mount is applicablesub-mount-filter-no-storageRobin Appelman2025-04-081-2/+1
| | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* | Merge pull request #52441 from nextcloud/scan-locked-errorKate2025-05-062-6/+15
|\ \
| * | fix: better error message when trying to scan a folder that is already being ↵scan-locked-errorRobin Appelman2025-04-252-6/+15
| | | | | | | | | | | | | | | | | | scanned Signed-off-by: Robin Appelman <robin@icewind.nl>
* | | Merge pull request #51779 from nextcloud/object-store-filenameKate2025-05-063-19/+56
|\ \ \
| * | | feat: store original storage id and path in object store metadataobject-store-filenameRobin Appelman2025-03-313-3/+28
| | | | | | | | | | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
| * | | feat: more generic way of passing metadata to object storage backends for ↵Robin Appelman2025-03-312-20/+32
| | | | | | | | | | | | | | | | | | | | | | | | new objects Signed-off-by: Robin Appelman <robin@icewind.nl>
* | | | fix: Forward 'extra' argument when optimizing queryartonge/fix/forward_extraLouis Chemineau2025-04-292-2/+2
| |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows DAV SEARCH queries containing optimizable comparisons on files metadata like: ```xml <d:or> <d:eq> <d:prop> <nc:metadata-photos-place /> </d:prop> <d:literal>La Valette-du-Var</d:literal> </d:eq> <d:eq> <d:prop> <nc:metadata-photos-place /> </d:prop> <d:literal>Évenos</d:literal> </d:eq> </d:or> ``` Signed-off-by: Louis Chemineau <louis@chmn.me>
* | | fix(objectstorage): add retry attempts to S3 connectionfix/51833/add-retries-to-s3-clientAnna Larch2025-04-231-0/+4
| | | | | | | | | | | | Signed-off-by: Anna Larch <anna@nextcloud.com>
* | | Merge pull request #51020 from nextcloud/artonge/fix/transfer_ownershipLouis2025-04-141-1/+12
|\ \ \
| * | | fix: Transfer ownership with S3 as primaryartonge/fix/transfer_ownershipLouis Chemineau2025-04-011-1/+12
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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(...)`: https://github.com/nextcloud/server/blob/687a4d9ac7fcdbd935f81a0def567a1092306f7a/apps/files/lib/Service/OwnershipTransferService.php#L112 - `oneTimeUserSetup(...)`: https://github.com/nextcloud/server/blob/687a4d9ac7fcdbd935f81a0def567a1092306f7a/lib/private/Files/SetupManager.php#L261-L262 - `mkdir(...)`: https://github.com/nextcloud/server/blob/687a4d9ac7fcdbd935f81a0def567a1092306f7a/lib/private/Files/ObjectStore/ObjectStoreStorage.php#L91-L135 - `moveFromStorage(...)`: https://github.com/nextcloud/server/blob/687a4d9ac7fcdbd935f81a0def567a1092306f7a/lib/private/Files/ObjectStore/ObjectStoreStorage.php#L635-L636 Delete pre-existing folder in `moveFromStorage(...)` Signed-off-by: Louis Chemineau <louis@chmn.me>
* | | fix: Catch old cached paths and fetch the new onefix/cache-hit-getFirstNodeByIdJulius Knorr2025-04-081-5/+9
| | | | | | | | | | | | Signed-off-by: Julius Knorr <jus@bitgrid.net>
* | | fix: Proper order for checking path prefix for getting file by id from cacheJulius Knorr2025-04-071-1/+1
| |/ |/| | | | | Signed-off-by: Julius Knorr <jus@bitgrid.net>
* | fix(cache): always require updates if mtime is nullfix/require-update-if-mtime-is-nullFerdinand Thiessen2025-04-041-1/+1
| | | | | | | | | | | | | | | | | | | | - 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>
* | feat: add debug logging for adding/removing items from the user mounts cacheusermountcache-loggingRobin Appelman2025-04-031-0/+3
| | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* | refactor(IMimeTypeDetector): use consistent capitalizationchore/consistent-namingFerdinand Thiessen2025-04-021-51/+52
|/ | | | | | | | - 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>
* feat: add command to list objectsRobin Appelman2025-03-311-2/+2
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* feat: add command to get object metadataRobin Appelman2025-03-311-3/+39
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* feat: add getParentId to ICacheEntryRobin Appelman2025-03-281-0/+4
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* fix(IFilenameValidator): correctly handle case insensitivityfix/file-name-validator-case-sensitivityFerdinand Thiessen2025-03-211-5/+3
| | | | | | | | - 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>
* fix(IMimeTypeDetector): use correct return typefix/IMimeTypeDetector-typesFerdinand Thiessen2025-03-181-2/+2
| | | | | | | | | | | | | | 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>
* Merge pull request #51333 from nextcloud/filePointerCheckGit'Fellow2025-03-171-8/+8
|\ | | | | fix(files): Make sure file pointer exists
| * fix(files): Make sure file pointer existsfilePointerCheckGit'Fellow2025-03-071-8/+8
| | | | | | Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
* | fix: fix getNodeFromCacheEntryAndMount using relative pathRobin Appelman2025-03-101-2/+2
|/ | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Merge pull request #50702 from ↵Andy Scherzinger2025-03-051-2/+4
|\ | | | | | | | | Institutional-Investment-Group/feat/support-aws-session-token9 feat(object_store): Add support for session token (STS) in AWS credentials
| * Merge branch 'master' into feat/support-aws-session-tokenHector Manuel2025-03-045-31/+30
| |\
| * | feat(object_store): Add support for session token in AWS credentialsHector Valcarcel2025-02-061-2/+4
| | | | | | | | | | | | | | | | | | - Pass session token, either null or with value, to the AWS Credentials constructor Signed-off-by: Hector Valcarcel <hmvalcarcel@gmail.com>
* | | fix: No IFactory in constructorbugfix/50619/no-session-work-in-constructorMarcel Müller2025-03-051-3/+1
| | | | | | | | | | | | Signed-off-by: Marcel Müller <marcel-mueller@gmx.de>