Commit Graph

390 Commits (d92bf388b1c553ecd6bfb2a7400b990dcafe9c54)

Author SHA1 Message Date
Kate 09fef8f0ec
Merge pull request #47417 from nextcloud/fix/files/create-mountpoint-parents 2024-09-04 20:00:24 +07:00
Andy Scherzinger bfb5835750
Merge pull request #47546 from nextcloud/fix/files-view-error-messages
fix: Adjust filename validation messages
2024-08-29 23:28:50 +07:00
Ferdinand Thiessen 030c209d22 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 17:22:20 +07:00
Louis Chemineau 2574cbfa61
chore: Apply php:cs recommendations
Signed-off-by: Louis Chemineau <louis@chmn.me>
2024-08-28 10:44:18 +07:00
Robin Appelman 62f8b6517f
feat: implement distributing partitioned queries over multiple shards
Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-08-28 10:21:19 +07:00
Ferdinand Thiessen 81c6c24cd5
fix: Adjust filename validation messages
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2024-08-27 23:12:24 +07:00
Daniel Kesselberg af6de04e9e
style: update codestyle for coding-standard 1.2.3
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2024-08-25 19:34:58 +07:00
provokateurin ebfbe99652
fix(files): Create non-existent parents of mountpoints
Signed-off-by: provokateurin <kate@provokateurin.de>
2024-08-22 12:04:31 +07:00
Joas Schilling e1caa198e3
ci: Skip flaky test on PHP 8.3
Signed-off-by: Joas Schilling <coding@schilljs.com>
2024-08-21 13:13:12 +07:00
Ferdinand Thiessen b9cc7bcec7
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-21 04:16:14 +07:00
John Molakvoæ d35c4eb911
Merge branch 'master' into jr-readdir-false-false
Signed-off-by: John Molakvoæ <skjnldsv@users.noreply.github.com>
2024-08-16 10:53:50 +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
Joas Schilling 829f2b9bc7
fix(db): Promote the use of `getDatabaseProvider` to reduce the impage of removed upstream platforms
Signed-off-by: Joas Schilling <coding@schilljs.com>
2024-07-19 11:21:14 +07:00
Robin Appelman c5b687271b
fix: make batch propagator work with sharding restrictions
Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-07-17 19:16:07 +07:00
Robin Appelman 0931492ff0
fix: make usermountcache compatible with sharding
Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-07-17 19:16:05 +07:00
Ferdinand Thiessen 322b3946d9
fix(dav): Verify target path in `setName` instead of source path
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2024-07-16 12:57:11 +07:00
Ferdinand Thiessen 69341e4306
refactor: Migrate filename validation logic from `Storage` to `FilenameValidator`
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2024-07-16 12:49:09 +07:00
Ferdinand Thiessen bdbeabafa7
feat: Add `forbidden_filename_basenames` config option
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>
2024-07-15 19:39:18 +07:00
Ferdinand Thiessen cf935e33ae
fix: `OCP\Files\Node\Folder::search` was not setting the owner
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>
2024-07-11 15:46:44 +07:00
Ferdinand Thiessen 46f1efac41
feat: Add `IFilenameValidator` to have one consistent place for filename 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>
2024-07-09 15:04:34 +07:00
Andy Scherzinger 1f7e2ba599
chore: Add SPDX header
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2024-05-13 17:41:36 +07:00
Robin Appelman 88ccea6d06
test: add test for jail watcher
Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-04-08 18:42:44 +07:00
Côme Chilliet ec5133b739 fix: Apply new coding standard to all files
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2024-04-02 14:16:21 +07:00
John Molakvoæ 5a1ed2d9ea
Merge pull request #40131 from summersab/refactor/OC-Server-getShareManager 2024-03-15 16:05:59 +07:00
Andrew Summers 45eb4a839d Refactor `OC\Server::getLockingProvider`
Signed-off-by: Andrew Summers <18727110+summersab@users.noreply.github.com>
2024-03-15 13:11:33 +07:00
John Molakvoæ 9338ef36de
Merge branch 'master' into refactor/OC-Server-getShareManager
Signed-off-by: John Molakvoæ <skjnldsv@users.noreply.github.com>
2024-03-15 13:03:34 +07:00
Thomas Citharel ffeb797ecc
refactor(mimeloader): modernize MimeTypeLoader
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2024-03-14 17:24:36 +07:00
Maxence Lange 467c84ec53 feat(files): copy live photos
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
2024-03-08 13:09:22 +07:00
Robin Appelman 51019fda7a fix: clearify logic around getMountsForFileId filtering
Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-03-06 10:54:00 +07:00
Robin Appelman fd4ca13867
Merge pull request #43471 from nextcloud/cache-path-by-id
Cache path by id
2024-03-05 17:26:25 +07:00
Dariusz Olszewski 277a6fc7ea test: Additional tests for issue #35776
Signed-off-by: Dariusz Olszewski <starypatyk@users.noreply.github.com>
2024-03-04 14:25:52 +07:00
Robin Appelman a9ee278ec6 perf: cache path by id to speedup getting nodes by id
Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-03-04 13:57:31 +07:00
Ferdinand Thiessen 27642d3e6d fix: Enforce forbidden filename characters on backend
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2024-02-28 22:19:25 +07:00
Robin Appelman 3890aa54be
add some comments for the distributive operation and add another test
Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-02-16 10:59:33 +07:00
Robin Appelman 1c87cee5ad
add extra flatten step to improve "or eq" -> "in" optimization
Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-02-15 17:55:44 +07:00
Robin Appelman 7ca516773f
add a search query step to split IN statements that are to large for oci
Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-02-15 17:55:43 +07:00
Robin Appelman 2e14a7a4a6
optimize query pattern used by storage filter
Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-02-15 17:55:40 +07:00
Robin Appelman 963721330f only get the path for the users cached mount info when we use it
most of the time we shouldn't need it so we can save joining on the filecache

Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-02-09 09:50:43 +07:00
Robin Appelman 5aea3f4d76 make storage directory test be a bit less strict about mtimes
sometimes the clock ticks over during the test

Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-02-07 12:13:00 +07:00
Thomas Citharel 30798eb6c2
refactor(objectstorage): cleanup types
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2024-02-02 14:59:21 +07:00
Robin Appelman 7aed19ac98
add test for updating etag with unchanged mtime in child folder
Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-01-31 18:05:12 +07:00
Robin Appelman 2cf9ed7ca5
add test for updating etag with unchanged mtime
Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-01-31 18:05:11 +07:00
Joas Schilling 5850695284
fix(tests): Add messages to assertions to explain what failed
Signed-off-by: Joas Schilling <coding@schilljs.com>
2024-01-26 20:46:14 +07:00
Ferdinand Thiessen 8e02014b55
chore(tests): Migrate object storage unit tests from drone to GitHub Actions
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2024-01-26 14:54:23 +07:00
Ferdinand Thiessen fceb781058
fix(tests): Fix deprecation errors in S3 tests
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2024-01-26 14:53:33 +07:00
Joas Schilling aa5f037af7
chore: apply changes from Nextcloud coding standards 1.1.1
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
2023-11-23 10:36:13 +07:00
Ferdinand Thiessen 5172baaf8b
fix(ObjectStore): Make copying behavior consistent with local storage
Drop file permissions on copy like we do on local storage.

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2023-11-17 12:54:37 +07:00
Robin Appelman b942850af9
optimize UserMountCache::registerStorage
Signed-off-by: Robin Appelman <robin@icewind.nl>
Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
2023-11-16 16:21:59 +07:00
Robin Appelman f4fa2fb93c
optimize isShared and isMounted
Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-11-08 17:34:58 +07:00
Robin Appelman b11ca34bbd
Merge pull request #40499 from nextcloud/known-mtime-wrapper
add wrapper for external storage to ensure we don't get an mtime that is lower than we know it is
2023-09-21 18:33:15 +07:00