aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/Files
Commit message (Collapse)AuthorAgeFilesLines
* fix(IFilenameValidator): correctly handle case insensitivityfix/file-name-validator-case-sensitivityFerdinand Thiessen2025-03-211-1/+91
| | | | | | | | - 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: make sure we process mime extensions as stringskjnldsv2025-02-051-0/+35
| | | | Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
* fix: Harden files scanner for invalid null accessFerdinand Thiessen2025-01-282-5/+10
| | | | | | 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>
* fix: Metadata field searchartonge/fix/metadata_field_searchLouis Chemineau2025-01-201-2/+7
| | | | Signed-off-by: Louis Chemineau <louis@chmn.me>
* test: update test for mountpoint numeric storage idmountpoint-get-numeric-storage-id-cacheRobin Appelman2025-01-131-0/+2
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* fix: improve checks for moving shares/storages into other mountsRobin Appelman2025-01-031-9/+42
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* fix: fix mimetype not being updated when changing file extention on object storeupdater-change-mimetype-objectstoreRobin Appelman2024-12-051-0/+35
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* test(View): Copy preserves contentLouis Chemineau2024-12-031-0/+8
| | | | Signed-off-by: Louis Chemineau <louis@chmn.me>
* fix(files): Correctly copy the cache information on copy operationsLouis Chemineau2024-12-031-0/+1
| | | | | | Needed to copy the `encrypted` flag of encrypted files when those files are two level down in a moved folder. Signed-off-by: Louis Chemineau <louis@chmn.me>
* fix: Wrap partial cache entry in CacheEntryartonge/fix/getting_cache_entryLouis Chemineau2024-11-211-3/+4
| | | | | | | | Because it is returned here: https://github.com/nextcloud/server/blob/7b7d07c5750583ab3a7b29112af475f5c8891143/lib/private/Files/Cache/Cache.php#L136-L137 And some implementation got stricter: https://github.com/nextcloud/groupfolders/blob/df95bf6ba807da5171de91108879b6d8aa9f3611/lib/Mount/RootEntryCache.php#L23-L28 Signed-off-by: Louis Chemineau <louis@chmn.me>
* Merge pull request #47847 from ↵John Molakvoæ2024-10-291-0/+23
|\ | | | | | | nextcloud/fix-copying-or-moving-from-shared-groupfolders
| * test: add test for nested jail cross-storage movefix-copying-or-moving-from-shared-groupfoldersRobin Appelman2024-10-101-0/+23
| | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* | refactor(Storage): Align all Storage constructorsrefactor/storage/constructorsprovokateurin2024-10-232-5/+5
|/ | | | Signed-off-by: provokateurin <kate@provokateurin.de>
* refactor(Storage): Make all parameter types strong typesprovokateurin2024-10-073-14/+12
| | | | Signed-off-by: provokateurin <kate@provokateurin.de>
* refactor(Wrapper\Encryption): Migrate to strong typesrefactor/stream-encryption/typingsprovokateurin2024-10-071-109/+119
| | | | Signed-off-by: provokateurin <kate@provokateurin.de>
* refactor(Stream\Encryption): Migrate to strong typesprovokateurin2024-10-071-26/+38
| | | | Signed-off-by: provokateurin <kate@provokateurin.de>
* test: Fix IStorage return typesprovokateurin2024-09-264-10/+44
| | | | Signed-off-by: provokateurin <kate@provokateurin.de>
* fix(tests): Pause trashbin for lock tests in ViewTest using rmdir and unlinkcleanup/event/trashbinCôme Chilliet2024-09-241-1/+16
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Merge pull request #48111 from ↵Côme Chilliet2024-09-231-1/+0
|\ | | | | | | | | nextcloud/fix/move-storage-constructor-to-specific-interface fix: Move storage constructor to specific interface
| * fix(tests): Fix test to remove call to non-existing constructorfix/move-storage-constructor-to-specific-interfaceCôme Chilliet2024-09-231-1/+0
| | | | | | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* | fix(users): Don't crash if disabled user is missing in the databaseartonge/fix/prevent_missing_users_from_crashing_disabled_users_searchLouis Chemineau2024-09-233-5/+10
|/ | | | Signed-off-by: Louis Chemineau <louis@chmn.me>
* chore(deps): Update nextcloud/coding-standard to v1.3.1provokateurin2024-09-196-11/+11
| | | | Signed-off-by: provokateurin <kate@provokateurin.de>
* test: put parent items into cache in testsRobin Appelman2024-09-184-50/+82
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* test: fix incorrect ltrim usage in testRobin Appelman2024-09-181-2/+2
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* fix(tests): Fix most obvious errors in ObjectStore testsCôme Chilliet2024-09-173-56/+60
| | | | | | Some are still failing Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* fix(tests): Fix Folder testsCôme Chilliet2024-09-171-3/+22
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Merge pull request #47986 from cfiehe/fix_move_on_same_bucketStephan Orbaugh2024-09-173-0/+178
|\ | | | | perf(ObjectStoreStorage): Improve (slow) move on same object bucket
| * perf(ObjectStoreStorage): Improve (slow) move on same object bucketChristoph Fiehe2024-09-163-0/+178
| | | | | | | | | | | | | | | | | | 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>
* | fix: Fix other uses of removed Storage interfaceCôme Chilliet2024-09-162-2/+3
| | | | | | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* | fix: Remove OCP\Files\Storage interface deprecated since version 9Côme Chilliet2024-09-163-13/+13
|/ | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* refactor: Add void return type to PHPUnit test methodsChristoph Wurst2024-09-1565-546/+546
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* feat(db): switch from settype to castsfeat/switch-from-settype-to-castsAnna Larch2024-09-151-1/+1
| | | | Signed-off-by: Anna Larch <anna@nextcloud.com>
* fix(files): Check if the target path is a descendant of the shared folder pathGit'Fellow2024-09-051-1/+9
| | | | | | | | | | | | | | | | | | 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/+31
|\
| * fix(files): Create non-existent parents of mountpointsprovokateurin2024-08-221-0/+31
| | | | | | | | Signed-off-by: provokateurin <kate@provokateurin.de>
* | Merge pull request #47546 from nextcloud/fix/files-view-error-messagesAndy Scherzinger2024-08-291-1/+1
|\ \ | | | | | | fix: Adjust filename validation messages
| * | fix: Adjust filename validation messagesFerdinand Thiessen2024-08-271-1/+1
| | | | | | | | | | | | Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
* | | fix: Renaming does not need update but delete permissionsFerdinand Thiessen2024-08-281-3/+3
| | | | | | | | | | | | | | | | | | | | | 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-7/+7
| | | | | | | | | | | | Signed-off-by: Louis Chemineau <louis@chmn.me>
* | | feat: implement distributing partitioned queries over multiple shardsRobin Appelman2024-08-281-0/+17
|/ / | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* / style: update codestyle for coding-standard 1.2.3Daniel Kesselberg2024-08-2515-163/+163
|/ | | | Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
* ci: Skip flaky test on PHP 8.3Joas Schilling2024-08-211-0/+4
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* fix: `FilenameValidator::isForbidden` should only check forbidden filesFerdinand Thiessen2024-08-211-17/+7
| | | | | | And not forbidden basenames as this is used for different purposes. Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
* Merge branch 'master' into jr-readdir-false-falseJohn Molakvoæ2024-08-1674-953/+1672
|\ | | | | Signed-off-by: John Molakvoæ <skjnldsv@users.noreply.github.com>
| * Merge pull request #46379 from nextcloud/fix/folder-search-ownerFerdinand Thiessen2024-07-301-3/+11
| |\ | | | | | | 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-3/+11
| | | | | | | | | | | | | | | | | | 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>
| * | fix(db): Promote the use of `getDatabaseProvider` to reduce the impage of ↵Joas Schilling2024-07-191-2/+2
| | | | | | | | | | | | | | | | | | removed upstream platforms Signed-off-by: Joas Schilling <coding@schilljs.com>
| * | fix: make batch propagator work with sharding restrictionsRobin Appelman2024-07-171-1/+1
| | | | | | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
| * | fix: make usermountcache compatible with shardingRobin Appelman2024-07-171-22/+33
| | | | | | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>