Commit graph

1243 commits

Author SHA1 Message Date
John Molakvoæ
705d9d1402
Revert "Revert "[stable26] handle not being able to write file for notify self-test"" 2023-04-14 18:35:55 +02:00
John Molakvoæ
3d0cfd1f2d
Revert "[stable26] handle not being able to write file for notify self-test" 2023-04-13 18:56:03 +02:00
Robin Appelman
e1418880e9 handle not being able to write file for notify self-test
Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-04-13 06:18:36 +00:00
Robin Appelman
76350d8a4d
Merge pull request #37394 from nextcloud/backport/36810/stable26
[stable26] do onetime user setup before getting any mount from providers
2023-04-06 13:10:29 +02:00
Robin Appelman
3fcb4169b5
Merge pull request #37558 from nextcloud/backport/36097/stable26
[stable26] extend path-prefix optimizer to remove all cases of path_hash= when encountering a path prefix filter
2023-04-06 13:07:59 +02:00
Robin Appelman
8ce285c9ab
Merge pull request #37537 from nextcloud/backport/35961/stable26
[stable26] clear encrypted flag when moving away from encrypted storage
2023-04-06 13:07:11 +02:00
Robin Appelman
747ed3900d extend path-prefix optimizer to remove all cases of path_hash= when encountering a path prefix filter
Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-04-03 14:55:05 +00:00
Robin Appelman
40748731f1 clear encrypted flag when moving away from encrypted storage
Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-04-01 16:49:37 +00:00
Côme Chilliet
599e85b341 Remove useless coalescing operator on non-null return value
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-04-01 13:12:05 +00:00
Côme Chilliet
a0beacde69 Fix quota typing for 32bits after forward port from 25
Signed-off-by: Côme Chilliet <91878298+come-nc@users.noreply.github.com>
2023-04-01 13:12:05 +00:00
Côme Chilliet
eaeb6b2c85 Silence a warning from psalm with explanation
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-04-01 13:12:05 +00:00
Côme Chilliet
741553eb93 Adapt types of subclasses
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-04-01 13:12:05 +00:00
Côme Chilliet
3044f63743 Make it clear that file sizes may be float on 32bits
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-04-01 13:12:05 +00:00
Vincent Petry
cb6227e68f Remove quota value type for 32-bit systems
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2023-04-01 13:12:04 +00:00
Robin Appelman
9d58c51d46 do onetime user setup before getting any mount from providers
this fixes a race condition where wrappers weren't properly applied if when a mount provider creates the storage instance one mountpoint creation instead of lazily

Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-03-24 16:10:29 +00:00
Julius Härtl
2664036b57
feat(s3): Use multipart upload for chunked uploading
This allows to stream file chunks directly to S3 during upload.

Signed-off-by: Julius Härtl <jus@bitgrid.net>
2023-03-09 15:31:12 +01:00
Julius Härtl
4ca6c3af7a fix: Use proper path for quota fetching
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2023-03-07 07:21:20 +00:00
Robin Appelman
936f634069
Merge pull request #36643 from nextcloud/fs-setup-instrimuntion
more filesystem setup performance instrumentation
2023-02-13 14:37:57 +01:00
Robin Appelman
91d5f6a826 more filesystem setup performance instrumentation
Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-02-10 11:11:13 +01:00
Julius Härtl
d9cd8b1d37
Merge pull request #36610 from nextcloud/folder-lazy-submounts 2023-02-10 09:09:08 +01:00
Robin Appelman
5bcf37b7ff only fetch the data for mounts inside a folder when needed
for most operations we don't actually care about any mounts inside a folder, only for metadata that needs to propagate across storage boundaries (size, etag, mtime) do we need all the submount info.

By only loading this data when needed we can save a bunch of storage setup in a number of cases

Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-02-09 11:39:00 +01:00
Julius Härtl
08802ad13f
Merge pull request #36566 from nextcloud/mount-find-by-numeric-id 2023-02-08 20:04:57 +01:00
Robin Appelman
9f3dbb699a fix tests
Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-02-07 15:50:10 +01:00
Côme Chilliet
308fcf4526
Respect OCP interface in private classes
Because the parameter type was moved to phpdoc it needs to be removed
 from implementations

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-02-07 11:23:35 +01:00
Côme Chilliet
028c225d96
Fix psalm errors
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-02-07 11:23:32 +01:00
Côme Chilliet
cd885b5705
Type sizes as int|float throughout the code base
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-02-07 11:23:31 +01:00
Côme Chilliet
5c1a0e0307
Allow float sizes in FileInfo for 32bits
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-02-07 11:23:31 +01:00
Côme Chilliet
d9dbed9105
Fix psalm errors related to filesizes
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-02-07 11:23:29 +01:00
Côme Chilliet
ff776a90b1
Strong type filesize related methods to ease 32bits problem findings
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-02-07 11:23:28 +01:00
Côme Chilliet
e156f8339c
Revert "remove 32-bit workarounds"
This reverts commit dd8774389e.

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-02-07 11:23:28 +01:00
Robin Appelman
e3bafcc7a8 cache numeric id in mountpoint
Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-02-06 18:20:08 +01:00
Robin Appelman
9281359fa4 deduplicate getStorage() logic in Mount\Manager
Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-02-06 18:17:40 +01:00
Robin Appelman
43589312cc dont delegate Mount\Manager::getByNumericId to getByStorageId
Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-02-06 18:16:23 +01:00
Joas Schilling
4bdc5834fa
Make sure name and path are strings
Otherwise Oracle returns NULL for empty strings and PHP 8.2
throws on null in string functions like trim() and md5()

Signed-off-by: Joas Schilling <coding@schilljs.com>
2023-02-02 12:05:22 +01:00
Joas Schilling
c27c9fac98
Try fixing Oracle
Signed-off-by: Joas Schilling <coding@schilljs.com>
2023-02-02 12:05:21 +01:00
Richard Steinmetz
f0a3b77d0f fix(encryption): don't throw on missing file
Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
2023-01-30 10:07:01 +01:00
Vincent Petry
9ecec2fd75
Merge pull request #35894 from nextcloud/move-from-encryption
fix moving files of encrypted local storage to unencrypted local storage
2023-01-26 09:45:12 +01:00
Julius Härtl
919a840f34
Merge pull request #32798 from nextcloud/enh/sse-c
[S3] Add option to specify an SSE-C customer provided key
2023-01-25 15:59:26 +01:00
Robin Appelman
33b90d28f8 fix moving files of encrypted local storage to unencrypted local storage
for example when moving encrypted files to a groupfolder

Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-01-24 16:40:41 +00:00
Thomas Citharel
00d9d49303 Add app config for default template path
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2023-01-24 09:39:31 +00:00
Julius Härtl
159a0c8411
feat(s3): Add option to specify an SSE-C customer provided key
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2023-01-24 10:36:03 +01:00
Côme Chilliet
f5c361cf44
composer run cs:fix
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-01-20 11:45:08 +01:00
Côme Chilliet
5e090d044d
Merge pull request #36075 from fmenabe/s3-storage-class
Add support for s3 storage classes
2023-01-16 09:43:53 +01:00
François Ménabé
cf9bdc0274 Manage s3 storage class in objectstore
Signed-off-by: François Ménabé <francois.menabe@gmail.com>
2023-01-12 14:58:27 +01:00
Git'Fellow
e855298b3c Switch logical operators
Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
2023-01-11 16:27:33 +00:00
Côme Chilliet
a7740c0ae6
Suppress last psalm error until upstream fix is released and included
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-01-02 15:17:38 +01:00
Côme Chilliet
a372564850
Fix psalm spotted errors with new requirements
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-01-02 15:02:28 +01:00
Vincent Petry
3bcbc4701a
Merge pull request #34724 from nextcloud/encryption-read-before-cache
fix reading newly written encrypted files before their cache entry is written
2022-12-20 17:16:12 +01:00
Vincent Petry
3b7cc31f64
Merge pull request #34924 from nextcloud/cache-jail-path-prefix
escape path prefix when doing cache jail search
2022-12-16 17:27:15 +01:00
Julius Härtl
59ae6e9dd6
Also update the unencrypted size of files when creating them with empty content
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2022-12-07 19:12:06 +01:00