Robin Appelman
5329c373cc
fix: improve error message when cache rename source can't be found
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-05-15 15:06:55 +02:00
John Molakvoæ
cac44fd924
Merge pull request #52822 from nextcloud/feat/mime-names
2025-05-15 11:41:12 +02:00
John Molakvoæ (skjnldsv)
24bc1d606e
feat(core): add human readable mimes
...
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2025-05-14 22:55:06 +02:00
John Molakvoæ
b3b63020c9
Merge pull request #52812 from nextcloud/chore/oc-helper-rmdirr
2025-05-14 21:53:47 +02: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 +02: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 +02:00
Kate
bfa494f247
Merge pull request #52800 from nextcloud/debt/noid/simple-file-generic-exception
2025-05-14 15:25:41 +02:00
Ferdinand Thiessen
072d4e8cba
chore: move implementation from OC legacy to OCP\Files
...
- 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>
2025-05-14 14:55:45 +02:00
Ferdinand Thiessen
85a6b0d0eb
chore: deprecate \OC_Helper::canExecute
...
replace this legacy method with just the IBinaryFinder
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2025-05-14 09:55:14 +02:00
Côme Chilliet
a86d917907
fix(encryption): Only prevent cache deletion if target is not object store in moveFromStorage
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-05-13 23:37:52 +02: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 +02:00
Côme Chilliet
e6275f8759
fix: Preserve file id when moving from object store even if encryption wrapper is present
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-05-13 23:37:52 +02:00
Côme Chilliet
9bb0721d66
fix: Fix mtime preservation when moving a directory across storages with encryption registered
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-05-13 23:37:52 +02:00
Côme Chilliet
8779ae38a4
fix(encryption): Fix filesize for part files in Encryption wrapper
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-05-13 23:37:52 +02:00
Daniel Kesselberg
866063c198
fix: annotate possible exceptions
...
File.getContent can throw a GenericFileException since https://github.com/nextcloud/server/pull/37943 .
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2025-05-13 22:27:19 +02:00
Robin Appelman
1e72620169
fix: fix unjailedroot of nested jails if there are other wrappers in between
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-05-13 18:29:00 +02: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 +02: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 +02:00
Côme Chilliet
2f1c74d43f
Merge pull request #51920 from nextcloud/newfolder-race-improvements
...
fix: improve handling of newFolder race condition handling
2025-05-13 09:16:54 +02:00
Robin Appelman
768b101a9d
Merge pull request #52706 from nextcloud/info-file-more-encryption-checks
...
feat: add more encryption checks to info:file
2025-05-12 13:17:26 +02:00
Robin Appelman
e6bdfcd8ed
Merge pull request #52665 from nextcloud/mountpoint-mkdir-quota
...
fix: create mountpoint folder even if the user has a quota of 0
2025-05-12 13:17:02 +02:00
Robin Appelman
b0b8159d6a
fix: throw a better error if we can't get the encrypted header size
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-05-09 22:33:45 +02:00
Robin Appelman
d9c53ef748
feat: add more encryption checks to info:file
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-05-09 16:35:31 +02:00
Robin Appelman
99364adc1c
fix: improve handling of newFolder race condition handling
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-05-08 15:19:40 +02:00
Robin Appelman
cd75876c1e
fix: create mountpoint folder even if the user has a quota of 0
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-05-08 15:15:36 +02:00
Kate
87bad33496
Merge pull request #52047 from nextcloud/sub-mount-filter-no-storage
2025-05-06 15:25:23 +02:00
Kate
c1a9dfd993
Merge pull request #52441 from nextcloud/scan-locked-error
2025-05-06 15:23:16 +02:00
Kate
9592390070
Merge pull request #51779 from nextcloud/object-store-filename
2025-05-06 15:21:01 +02:00
Louis Chemineau
5c73f2c37f
fix: Forward 'extra' argument when optimizing query
...
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>
2025-04-29 18:17:23 +02:00
Robin Appelman
bb4cf2830a
fix: better error message when trying to scan a folder that is already being scanned
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-04-25 18:40:03 +02:00
Anna Larch
49baa914cf
fix(objectstorage): add retry attempts to S3 connection
...
Signed-off-by: Anna Larch <anna@nextcloud.com>
2025-04-23 12:15:06 +02:00
Louis
f8391e60ce
Merge pull request #51020 from nextcloud/artonge/fix/transfer_ownership
2025-04-14 16:14:45 +02:00
Robin Appelman
c1dbc27fd6
fix: don't construct storage when checking if a sub-mount is applicable
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-04-08 18:21:41 +02:00
Julius Knorr
7ff80cc016
fix: Catch old cached paths and fetch the new one
...
Signed-off-by: Julius Knorr <jus@bitgrid.net>
2025-04-08 09:17:35 +02:00
Julius Knorr
7fa3f89ef9
fix: Proper order for checking path prefix for getting file by id from cache
...
Signed-off-by: Julius Knorr <jus@bitgrid.net>
2025-04-07 20:47:11 +02:00
Ferdinand Thiessen
3a09acebd2
fix(cache): always require updates if mtime is null
...
- 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>
2025-04-04 13:41:32 +02:00
Robin Appelman
c3f06b370c
feat: add debug logging for adding/removing items from the user mounts cache
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-04-03 17:58:46 +02:00
Ferdinand Thiessen
97ad171d32
refactor(IMimeTypeDetector): use consistent capitalization
...
- 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>
2025-04-02 13:22:16 +02: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 +02:00
Robin Appelman
8aae332622
feat: store original storage id and path in object store metadata
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-03-31 15:10:58 +02:00
Robin Appelman
94114b99f7
feat: more generic way of passing metadata to object storage backends for new objects
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-03-31 14:55:18 +02:00
Robin Appelman
fcde776683
feat: add command to list objects
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-03-31 14:30:40 +02:00
Robin Appelman
c3bc362f48
feat: add command to get object metadata
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-03-31 14:30:40 +02:00
Robin Appelman
2e9222a29a
feat: add getParentId to ICacheEntry
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-03-28 16:47:07 +01: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 +01:00
Ferdinand Thiessen
d5efd17942
fix(IMimeTypeDetector): use correct return type
...
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>
2025-03-18 15:34:28 +01:00
Git'Fellow
dda2148f6f
Merge pull request #51333 from nextcloud/filePointerCheck
...
fix(files): Make sure file pointer exists
2025-03-17 17:04:24 +01:00
Robin Appelman
8edca98e8e
fix: fix getNodeFromCacheEntryAndMount using relative path
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-03-10 18:19:20 +01:00
Git'Fellow
4d52b185af
fix(files): Make sure file pointer exists
...
Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
2025-03-07 19:16:30 +01:00
Andy Scherzinger
fdb246c1cf
Merge pull request #50702 from Institutional-Investment-Group/feat/support-aws-session-token9
...
feat(object_store): Add support for session token (STS) in AWS credentials
2025-03-05 17:40:05 +01:00