Commit graph

1106 commits

Author SHA1 Message Date
Vincent Petry
8809de1eef
Merge pull request #31966 from nextcloud/unencrypted-size
store unencrypted size in the unencrypted_size column
2022-06-13 11:55:37 +02:00
Vincent Petry
bea755f153
Merge pull request #32723 from MartinBrugnara/master
Expose umask override value as config parameter: localstorage.umask
2022-06-10 11:23:31 +02:00
Vincent Petry
56b1453945
Merge pull request #32768 from nextcloud/fs-setup-onetime-earlier
perform onetime setup earlier to ensure wrappers are registered on time
2022-06-10 11:21:54 +02:00
Robin Appelman
5c768f980e
fix mounts mounted at the users home
this fixes external storages with '/' as mountpoint

Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-06-09 19:21:56 +02:00
Robin Appelman
a937ab03dd
perform onetime setup earlier to ensure wrappers are registered on time
this fixes an issue with wrappers like encryption not always being applied to mountpoint that create the storage object directly (such as external storage)

Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-06-08 18:49:54 +02:00
Robin Appelman
499995b37a
handle stream wrappers in SeekableHttpStream
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-06-08 17:52:27 +02:00
Martin Brugnara
7409569994
Expose umask override value as config parameter: localstorage.umask
Commit 451c06d introduced override for umask value.
This is needed to avoid broken env configuration or dirty workers
to mess with the permissions when creating new files.

Most Nextcloud, that does not integrate with external software
would work fine with an hard-coded value (451c06d set it at 022).

Advanced install may require more flexibility, as such this commit
exposes the "umask override value" as configuration parameter:
`localstorage.umask`

It defaults to 0022 both in code and in config/config.sample.php .

Signed-off-by: Martin Brugnara <martin@0x6d62.eu>
2022-06-05 19:19:31 +02:00
Robin Appelman
8238582e59
store unencrypted size in the unencrypted_size column
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-06-02 16:07:00 +02:00
Julius Härtl
0f0e74a78c Cleanup temporary files after finishing the write to object storage
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2022-06-02 12:57:18 +00:00
Daniel Kesselberg
f399fd41ec
Fix docblock for return type
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2022-05-27 20:05:46 +02:00
Simon L
18dd460720
Merge pull request #26813 from nextcloud/feature/files-search-tags
Files: Extend search to also cover tags
2022-05-18 10:58:02 +02:00
Marcel Klehr
f755ee0868 Files: Extend search to also cover tags
fixes #326

Signed-off-by: Marcel Klehr <mklehr@gmx.net>
2022-05-17 21:05:09 +02:00
John Molakvoæ
fe33e9c08c
Merge pull request #32250 from nextcloud/cleanup/cappedmemorycache 2022-05-13 08:27:28 +02:00
Carl Schwan
ec6b83cc18 Add stricter psalm type for CappedMemoryCache
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-05-12 15:06:18 +02:00
Carl Schwan
a392cd70fb Make it possible to get the appdata folder using the public API
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-05-11 23:28:37 +02:00
Vincent Petry
fe24091ffb
Merge pull request #32110 from plumbeo/binary-encoding-4
Save encrypted files in binary format
2022-05-05 18:04:06 +02:00
Vincent Petry
4147e1233a
Merge pull request #32152 from nextcloud/bugfix/32151/allow-compatibility-wrapper-local-ext-storage
Allow compatibility wrapper on local external storage
2022-05-05 08:18:52 +02:00
plumbeo
1258caeab7 Save encrypted files in binary format
Default to the more space-efficient binary encoding for newly encrypted files
instead of the traditional base64 encoding, eliminating the 33% overhead.

The new option 'encryption.use_legacy_encoding' allows to force the legacy
encoding format if needed. Files encoded in the old format remain readable.

Based on https://github.com/owncloud/encryption/pull/224 and
https://github.com/owncloud/core/pull/38249 by karakayasemi.

Signed-off-by: plumbeo <plumbeo@users.noreply.github.com>
2022-05-04 17:38:25 +02:00
Côme Chilliet
459202d54c
Merge pull request #31752 from nextcloud/fix/remove-still-more-ilogger
Move away from deprecated ILogger
2022-05-02 10:15:10 +02:00
Carl Schwan
dbdb9f6f11
Merge pull request #32034 from nextcloud/bugfix/noid/satisfy-binary-operation-order
Make the binary operation order explicit
2022-04-27 11:53:18 +02:00
Côme Chilliet
2b07031d3e
composer run cs:fix
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-04-26 16:52:53 +02:00
Côme Chilliet
23f7a37c03
Remove ILogger usages in lib/private/Files/Storage
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-04-26 16:52:53 +02:00
Côme Chilliet
069477e608
Migrate more classes of lib/private to LoggerInterface
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-04-26 16:52:52 +02:00
Vincent Petry
23403ef693
Allow compatibility wrapper on local external storage
The check was likely in place to prevent adding the wrapper on the root
and home storage, which is not possible anyway since the encoding option cannot
be set on that mount.

Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2022-04-26 09:27:29 +02:00
Vincent Petry
6935baa568
Merge pull request #32084 from nextcloud/root-setup-groupfolders
only need to setup root for groupfolders
2022-04-25 19:35:59 +02:00
Robin Appelman
f7413b9afc
Merge pull request #32074 from nextcloud/mysql-search-ignore-index-2
tell mysql to ignore the sort index for search queries
2022-04-25 11:23:51 +00:00
Vincent Petry
ff385dc679
Merge pull request #32082 from nextcloud/directory-content-lazy-owner
use a lazy user for the file owner when listing a directory
2022-04-25 11:44:44 +02:00
Vincent Petry
e693781c21
Merge pull request #32079 from nextcloud/directory-listing-optimize-add-submount
optimize adding submount info to directory content
2022-04-25 11:44:26 +02:00
Robin Appelman
b36dfd8f11 Only need to setup root for groupfolders
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-04-22 17:47:08 +02:00
Julius Härtl
fb59875071
Merge pull request #32040 from nextcloud/full-setup-only-new
only register mounts that are new from providers that are new during a full setup
2022-04-22 17:03:09 +02:00
Robin Appelman
7a6c724a81 Use a lazy user for the file owner when listing a directory
Only getUID and getDisplayName are called on the file owner objects anyway
and we can get this information often without DB request

Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-04-22 17:02:37 +02:00
Robin Appelman
9f0ba3adc2
optimize adding submount info to directory content
no need to loop when we can do a hashtable lookup

Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-04-22 15:50:14 +02:00
Robin Appelman
a4e120c203
tell mysql to ignore the sort index for search queries
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-04-22 13:42:33 +02:00
Robin Appelman
bbf283f818
cache fullSetupRequired locally
no need to hit redis every time

Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-04-21 16:00:28 +02:00
Robin Appelman
561a2071e4
only register mounts that are new from providers that are new during a full setup
this fixes cases where during the (partial) setup of a shared mount a full setup is triggered

Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-04-21 12:53:50 +02:00
Joas Schilling
49e62149d8
Make the binary operation order explicit
Signed-off-by: Joas Schilling <coding@schilljs.com>
2022-04-21 10:47:26 +02:00
Robin Appelman
caebdc2a55
Merge pull request #32024 from nextcloud/local-metadata-forbidden
ignore forbidden files while scanning local storage
2022-04-20 12:34:23 +00:00
Robin Appelman
468d6a9cf1
ignore forbidden files while scanning local storage
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-04-20 13:01:16 +02:00
Arthur Schiwon
1ec4563c2e
log stacktrace for 'Backends provided no user object'
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2022-04-20 12:15:39 +02:00
Carl Schwan
7817845538 Add a metadata service to store file metadata
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-04-13 14:06:29 +02:00
Robin Appelman
b65d214f15
perform a setup if we can't find any mounts containing a file
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-04-11 19:15:58 +02:00
Vincent Petry
1b819b8649
Merge pull request #31901 from nextcloud/fs-setup-tweaks
Filesystem setup tweaks
2022-04-08 17:47:36 +02:00
Vincent Petry
0d7d28e530
Merge pull request #31676 from nextcloud/enh/ocp-owner-lock
Add public API for owner based file locking
2022-04-08 17:43:26 +02:00
Robin Appelman
499749dbc1
more preset metadata for LazyUserFolder
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-04-08 15:09:40 +02:00
Robin Appelman
54e52e9b5e
always do full setup for home folder with submounts
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-04-08 15:05:43 +02:00
Robin Appelman
bdc86e9486
add missing return
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-04-08 15:04:35 +02:00
Robin Appelman
9834350ac3
Merge pull request #31713 from nextcloud/fed-performance
Federated share performance improvements
2022-04-07 18:53:36 +00:00
Julius Härtl
9b408d556d
Adapt LockScope to LockContext rename
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2022-04-07 11:52:16 +02:00
Robin Appelman
5e69f98c16
sh
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-04-06 18:08:13 +02:00
Robin Appelman
151c800397
allow reusing known folder info when getting directory contents
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-04-06 14:40:34 +02:00