Robin Appelman
e8872f01ae
Merge pull request #31431 from nextcloud/fs-setup-manager
...
Unify/cleanup filesystem setup
2022-03-08 14:50:25 +00:00
Pytal
232af474a8
Merge pull request #31418 from nextcloud/enh/simple-file-extension
2022-03-07 11:38:23 -08:00
Robin Appelman
917c74e214
type fixes
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-03-04 16:30:16 +01:00
Robin Appelman
07a7dcb824
move user mountpoint setup to setupmanager
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-03-04 16:30:12 +01:00
Robin Appelman
d81713e5c1
simplify setup of circular SetupManager<->Manager
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-03-04 16:30:09 +01:00
Robin Appelman
6c1d051ecd
add template annotations to CappedMemoryCache
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-03-04 16:30:06 +01:00
Robin Appelman
22875bf367
move logic to decide what to setup to setupmanager
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-03-04 16:30:03 +01:00
Robin Appelman
1c468129af
adjust tests to new fs setup
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-03-04 16:29:59 +01:00
Robin Appelman
5c0fe93498
move teardown logic to SetupManager
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-03-04 16:29:50 +01:00
Robin Appelman
15ff65c12f
start moving filesystem setup logic to it's own place
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-03-04 16:29:47 +01:00
Robin Appelman
7630d7a934
more type hints for ICachedMountInfo and IMountManager
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-03-04 16:28:11 +01:00
Robin Appelman
8b22a463e9
Merge pull request #31266 from nextcloud/root-setup-mountprovider
...
move root mount setup to mountproviders
2022-03-04 13:44:05 +00:00
Christopher Ng
0571391b10
Extend simple file with extension getter
...
Signed-off-by: Christopher Ng <chrng8@gmail.com>
2022-03-04 06:11:53 +00:00
Joas Schilling
88f4e972c5
Don't set up full filesystem to check for certificates
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2022-02-26 00:40:12 +01:00
Robin Appelman
b0ce876f41
return dummy availability if storage is not found in cache
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-02-25 15:25:13 +01:00
Robin Appelman
8b7c8447a0
move root mount setup to mountproviders
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-02-24 17:21:42 +01:00
Robin Appelman
cfb7923e08
store mountprovider for each mount in the mounts table
...
this enabled more fine grained filesystem setup
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-02-23 18:02:33 +01:00
Louis Chemineau
bc2c02f451
Wrap S3 multipart upload exception
...
Signed-off-by: Louis Chemineau <louis@chmn.me>
2022-02-16 14:56:14 +01:00
Louis Chemineau
0b768c17d2
Wrap S3 multipart upload exception
...
Signed-off-by: Louis Chemineau <louis@chmn.me>
2022-02-15 17:35:12 +01:00
Vincent Petry
787716613f
Merge pull request #31035 from paierlep/fix/occ_scan_no_files_error
...
Removes misleading error message in occ files:scan for new users.
2022-02-10 18:07:21 +01:00
Robin Appelman
2673775f6e
fix fs cache test user setup
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-02-09 16:01:28 +01:00
Robin Appelman
1ab58eff0f
pass user object during fs init
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-02-09 16:01:24 +01:00
Robin Appelman
0217949715
only setup part of the filesystem for appdata requests
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-02-09 16:01:21 +01:00
Christian Paier
9476ce70ed
Removes misleading error message in occ files:scan for new users.
...
Previously the occ files:scan command printed an error message for any
new users without any files/folders in the data directory.
With this change only users with any file/folder is scanned.
This fixes #25433 .
Signed-off-by: Christian Paier <hallo+git@cpaier.com>
2022-02-05 23:54:56 +01:00
MichaIng
ba1338e680
Return 404 when AJAX tries to list dir content but file given
...
Due to a code mistake, the expected 404 return when AJAX tries to list a directory content with a non-directory file path given, does not happen. It instead fails with another exception.
This commit restores the original intention to return 404 in the first place when passing a non-directory path with the "dir" parameter.
Signed-off-by: MichaIng <micha@dietpi.com>
2022-01-26 16:11:50 +01:00
Côme Chilliet
5cca86ce19
Remove redundant if clause
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-01-25 16:53:35 +01:00
Côme Chilliet
35dcda36a3
Fix OC\Files\Storage\DAV::hasUpdated when cache is not set
...
Fixes the test OCA\Files_External\Tests\Storage\WebdavTest::testStat on
PHP>=7.4
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-01-25 16:53:19 +01:00
Vincent Petry
4903cb8db4
Merge pull request #29866 from nextcloud/isset-size
...
Check if size value is set
2022-01-17 10:59:52 +01:00
Vincent Petry
cfafd79706
Merge pull request #30631 from nextcloud/fix/update_encrypted_version
...
updateEncryptedVersion: cleanup on target if cache already got renamed
2022-01-14 09:45:08 +01:00
Carl Schwan
cbf9064b8e
Fix psalm issues
...
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-01-13 12:30:27 +01:00
Carl Schwan
695165260f
Add helper method in Wrapper
...
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-01-13 10:39:36 +01:00
Carl Schwan
89d109a4d9
Merge pull request #30508 from nextcloud/fix/psaml-bin
...
Fix psalm not running
2022-01-13 09:51:04 +01:00
Carl Schwan
6312c0df69
Check style update
...
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-01-13 00:19:07 +01:00
Carl Schwan
aeecb72e96
Fix a few psalm issues and moved back to psalm/phar 4.18
...
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-01-12 20:03:06 +01:00
Jonas Meurer
a2f4c62c19
updateEncryptedVersion: cleanup on target if cache already got renamed
...
When moving a file to trash with encryption enabled, the cache gets
moved before the actual file. According to @icewind1991 this is in order
to not break object storage.
When moving a file from an unencrypted storage (e.g. a collectives
storage) to the encrypted trashbin storage, this causes errors, see
This commit fixes it by doing `updateEncryptedVersion()` on the target
cache entry *if* the source cache entry doesn't exist anymore, but the
corresponding target cache entry does exist already.
Fixes : #26544
Signed-off-by: Jonas Meurer <jonas@freesources.org>
2022-01-12 15:47:08 +01:00
Vincent Petry
be590df588
Fix fail when keys/files folder already exists
...
Fixes an issue with transfer ownership in move mode where the folder
"files_encryption/keys/files" already exists.
Instead of failing, its existence is checked before calling mkdir.
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2022-01-10 11:15:22 +01:00
Julius Härtl
2aac757805
Make max size for single put uploads configurable
...
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2021-12-29 13:30:22 +01:00
Julius Härtl
6f986519fe
Merge pull request #28610 from nextcloud/enh/preview-cleanup-query
2021-12-28 13:20:02 +01:00
Julius Härtl
e475dfe16c
Fix php-cs for S3ConnectionTrait.php
...
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2021-12-21 21:35:46 +01:00
Julius Härtl
1acfbd0b06
Merge pull request #27493 from cuppett/cuppett/simplify-aws-credential-provider
2021-12-21 11:58:52 +01:00
Pytal
c019e33b99
Merge pull request #30160 from nextcloud/bugfix/noid/encryption-wrapper-fclose-check
2021-12-09 15:59:51 -08:00
Vincent Petry
6f81e60bce
Check resource before closing in encryption wrapper
...
In case of error there is no guarantee that $source or $target is set or
is a resource when handling an error.
Without this fix, there's a risk that fclose will fail and the actual
exception will not be thrown, making it impossible to find out about the
root cause.
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2021-12-09 11:28:10 +01:00
acsfer
074a9a5e88
Switch logical operators
...
Unless there is a good reason to keep actual ones 👀
2021-12-03 16:05:19 +01:00
Robin Appelman
f5fe887b4b
background scan the source storage when a background scan on a storage jail is triggered
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2021-12-02 17:34:58 +01:00
Joas Schilling
65d79bb592
Check for invalid characters before trimming
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-11-25 08:48:26 +01:00
acsfer
97e1855ed5
Typo
2021-11-24 11:55:06 +01:00
acsfer
0a0fd33773
Check if size value is set
...
Using `isset()` as it does not return true for array keys that correspond to a `null` value, while `array_key_exists()` does.
Fix #29865
2021-11-23 21:33:28 +01:00
Côme Chilliet
66bdda568a
Fix Guzzle function calls
...
Since 1.7.0 and 2.0 these functions are turned into static methods.
See https://github.com/guzzle/psr7#upgrading-from-function-api
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2021-11-23 09:28:57 +01:00
Côme Chilliet
113756db30
Fix ArrayAccess and JsonSerializable return types
...
First round of modifications for PHP 8.1
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2021-11-23 09:28:56 +01:00
Stephen Cuppett
4a6a2c2b48
Simplify S3ConnectionTrait to defaultProvider plus option
...
When we initially added the EC2 and ECS IAM role support in #24700 ,
we had to use a workaround by explicitly ordering the various providers
due to an inconsistency in the AWS SDK for PHP. We submitted a PR there
to get that squared away. Now, we've consumed that version upstream
for the SDK and can update our code here to be the most concise version
as well as position ourselves to pick up new methods as those become
available and prevalent in AWS (for acquiring credentials).
See also: https://github.com/nextcloud/server/pull/24700#issuecomment-747650892
See also: https://github.com/aws/aws-sdk-php/pull/2172
Signed-off-by: Stephen Cuppett <steve@cuppett.com>
2021-11-22 07:04:48 -05:00