Marcel Klehr
43be97de08
fix(FileAccess): Use one param for rewriting home dirs and excluding non-user files mounts
...
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
2025-07-15 09:15:16 +07:00
Julien Veyssier
3a96f8e533
fix(FileAccess*): fix tests
...
Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
2025-07-15 09:15:16 +07:00
Julien Veyssier
cb221c8211
fix(FileAccess*): Change the way home dir root is found, remove the excludeTrashbinMounts param of getDistinctMounts
...
Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
2025-07-15 09:15:16 +07:00
Julien Veyssier
7e986988fe
fix(FileAccess*): Adress review comments
...
Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
2025-07-15 09:15:16 +07:00
Marcel Klehr
131125bbb7
fix(FileAccessTest): Adress review comments
...
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
2025-07-15 09:15:16 +07:00
Marcel Klehr
26f6013c1f
fix(FileAccessTest): Make it work on sharded instance
...
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
2025-07-15 09:15:16 +07:00
Marcel Klehr
3941622059
fix(FileAccessTest): Make sure path_hash is not NULL
...
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
2025-07-15 09:15:16 +07:00
Marcel Klehr
10cc43041b
fix(FileAccess#getByAncestorInStorage): Use a subquery to fix tests
...
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
2025-07-15 09:15:16 +07:00
Marcel Klehr
d67c877ac5
fix(FileAccess): Add tests
...
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
2025-07-15 09:15:16 +07:00
Robin Appelman
aa15f9d16d
chore: run rector
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-07-01 22:45:52 +07:00
Ferdinand Thiessen
5981b7eb51
chore: apply new CSFixer rules
...
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
# Conflicts:
# apps/settings/lib/SetupChecks/PhpOpcacheSetup.php
2025-07-01 16:26:50 +07:00
Ferdinand Thiessen
35a27b5fd5
fix(FilenameValidator): use `_` as default replacement for invalid chars
...
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2025-06-18 09:44:57 +07:00
Robin Appelman
3561937816
chore: run rector on tests with new rule
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-06-12 18:38:29 +07:00
Robin Appelman
29e39c0a2e
chore: run rector on tests
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-06-12 18:31:58 +07:00
Joas Schilling
a425a1affc
test: Add a hint message on boolean comparison
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2025-06-06 14:36:33 +07:00
Louis
f4cb78b905
Merge pull request #52242 from nextcloud/artonge/fix/copy_subfolders_s3
2025-06-02 11:55:54 +07:00
Robin Appelman
be3cfefc75
Merge pull request #52816 from nextcloud/primary-object-store-settings
...
feat: move primary object store configuration to a single place
2025-05-28 17:40:53 +07:00
Robin Appelman
e21ce793a5
test: add test that object store folder copy preserves folder size
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-05-28 15:52:00 +07:00
Robin Appelman
7599162c7b
feat: move primary object store configuration to a single place
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-05-28 15:32:31 +07:00
Ferdinand Thiessen
9422b6d6d0
test: adjust library tests for PHPunit deprecations
...
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2025-05-28 11:20:15 +07:00
Côme Chilliet
9560e00cf3
chore: Remove useless legacy autoloader for tests
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-05-27 16:15:58 +07:00
provokateurin
6818aa9b12
feat(UserMountCache): Emit events for added, removed and updated mounts
...
Signed-off-by: provokateurin <kate@provokateurin.de>
2025-05-19 13:54:51 +07:00
Kate
6b4f5c567c
Merge pull request #52848 from nextcloud/fix/cleanup-servercontainer
2025-05-19 07:02:11 +07:00
Ferdinand Thiessen
494a079321
test: replace `OC_Helper:rmdirr` with `OCP\Files::rmdirr`
...
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2025-05-16 23:09:37 +07:00
Côme Chilliet
70ef0a8db7
fix: Remove calls to legacy callers in tests
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-05-16 11:47:38 +07:00
Côme Chilliet
0243d23b8c
fix(tests): Remove calls to removed getMountProviderCollection from tests
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-05-16 10:49:03 +07:00
Joas Schilling
5f9117b939
test: Fix coding standards
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2025-05-15 08:48:13 +07:00
Joas Schilling
3e7db013c1
test: Fix non-static data providers
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2025-05-15 08:25:01 +07:00
Joas Schilling
9621e451ba
test: Fix tests/lib/Files
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2025-05-15 08:25:00 +07:00
Joas Schilling
5283e9a5e2
test: Cleanup tests/lib/Files/*
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2025-05-15 08:21:22 +07:00
Côme Chilliet
2cd491f491
Merge pull request #48560 from nextcloud/fix/migrate-encryption-away-from-hooks
...
feat(encryption): Migrate from hooks to events
2025-05-14 19:25:51 +07:00
Andy Scherzinger
14f79829f3
Merge pull request #52775 from nextcloud/nested-jail-root
...
fix unjailedroot of nested jails if there are other wrappers in between
2025-05-14 17:36:55 +07:00
Côme Chilliet
a79b5dea7c
fix(encryption): Improve Update class and event listenening
...
to avoid back&forth between path and Node object
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-05-13 23:37:52 +07:00
Côme Chilliet
e35a8ed063
fix(tests): Disable encryption wrapper when it makes sense
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-05-13 23:37:52 +07:00
Côme Chilliet
21233b7e17
fix(tests): Remove Encryption disabling in ViewTest to avoid side effects
...
Adapt tests a bit to make them pass with Encryption wrapper registered
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-05-13 23:37:52 +07:00
Côme Chilliet
38f341c179
fix(tests): Unregister encryption modules in ViewTest to avoid side effects
...
It was clearing the hooks with the same results before
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-05-13 23:37:52 +07:00
Robin Appelman
0001c22668
test: add test for nested cache jail unjailedroot
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-05-13 18:29:00 +07:00
Ferdinand Thiessen
6cf1870322
feat(FilenameValidator): allow to sanitize filenames
...
Share the filename sanitizing with the OCP filename validator.
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2025-05-13 14:14:17 +07:00
Joas Schilling
c24f5fb256
test: Finish migrating tests/Core/ to PHPUnit 10 compatible code
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2025-05-02 16:47:42 +07:00
Louis
f8391e60ce
Merge pull request #51020 from nextcloud/artonge/fix/transfer_ownership
2025-04-14 16:14:45 +07:00
Côme Chilliet
0cf4f3cc71
fix: Replace all usages of OC_User backend method calls by IUserManager
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-04-10 11:29:21 +07:00
Louis Chemineau
8fdf2a7eae
fix: Transfer ownership with S3 as primary
...
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(...)`: 687a4d9ac7/apps/files/lib/Service/OwnershipTransferService.php (L112)
- `oneTimeUserSetup(...)`: 687a4d9ac7/lib/private/Files/SetupManager.php (L261-L262)
- `mkdir(...)`: 687a4d9ac7/lib/private/Files/ObjectStore/ObjectStoreStorage.php (L91-L135)
- `moveFromStorage(...)`: 687a4d9ac7/lib/private/Files/ObjectStore/ObjectStoreStorage.php (L635-L636)
Delete pre-existing folder in `moveFromStorage(...)`
Signed-off-by: Louis Chemineau <louis@chmn.me>
2025-04-01 13:53:56 +07:00
Ferdinand Thiessen
254dd85664
fix(IFilenameValidator): correctly handle case insensitivity
...
- 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>
2025-03-21 01:00:58 +07:00
skjnldsv
6baafd82b6
fix: make sure we process mime extensions as string
...
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
2025-02-05 12:35:41 +07:00
Ferdinand Thiessen
b48ee2e924
fix: Harden files scanner for invalid null access
...
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>
2025-01-28 20:08:46 +07:00
Louis Chemineau
a635710117
fix: Metadata field search
...
Signed-off-by: Louis Chemineau <louis@chmn.me>
2025-01-20 14:41:55 +07:00
Robin Appelman
7b2cb2e3bc
test: update test for mountpoint numeric storage id
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-01-13 18:09:29 +07:00
Robin Appelman
16d0363937
fix: improve checks for moving shares/storages into other mounts
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-01-03 15:36:32 +07:00
Robin Appelman
37199779de
fix: fix mimetype not being updated when changing file extention on object store
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-12-05 18:05:13 +07:00
Louis Chemineau
425e0c3660
test(View): Copy preserves content
...
Signed-off-by: Louis Chemineau <louis@chmn.me>
2024-12-03 18:29:32 +07:00