Commit graph

302 commits

Author SHA1 Message Date
Simon L
fa4d153610
Merge pull request #38115 from DerGenaue/patch-1
Rename `numericStorageId` to `numericExternalStorageId` in PersonalMount.php
2023-05-16 19:08:39 +02:00
Robin Appelman
2466724b01
check the username when doing external storage session auth
Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-05-11 17:47:56 +02:00
Daniel
55d7add92f
Rename numericStorageId to numericExternalStorageId in PersonalMount.php
so that it doesn't override `numericStorageId` in the `MountPoint` baseclass

fixes https://github.com/nextcloud/server/issues/37473
fixes https://github.com/nextcloud/server/issues/37414

Signed-off-by: Daniel <7558512+DerGenaue@users.noreply.github.com>
2023-05-07 04:47:44 +02:00
James Guo
bb173e092b
Update AmazonS3.php
Signed-off-by: James Guo <i@ze3kr.com>
2023-04-06 14:34:08 +08:00
Robin Appelman
b1f352c614
improve handling of files we can't access in the scanner
instead of erroring, remove the items from the cache.

this situation can be triggered if a user has access to a file but looses it afterwards

Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-04-05 14:44:55 +02:00
Robin Appelman
fd0ef588b4
fix ftp external storage with filezilla server
- filezilla doesn't like "" as parameter for `mdtm` (all others seem fine)
- filezilla sends fractional modified date

Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-03-30 17:44:47 +02: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
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
Vincent Petry
f0b9b6ebaa
Merge pull request #36089 from nextcloud/enh/noid/ext-storage-default-values
Ext storage configs default value support + enable SSL by default
2023-01-16 14:22:16 +01:00
Vincent Petry
4e179e0e07
Enable SSL by default in ext storage configs
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2023-01-13 10:27:17 +01:00
Vincent Petry
a0f70988f4
Extend ext storage params to contain default value
Extend the external storage configuration parameters definition to allow
to specify a default value

Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2023-01-13 10:27:17 +01:00
François Ménabé
710f3fd405 Support of s3 storage class in External Storage application
Signed-off-by: François Ménabé <francois.menabe@gmail.com>
2023-01-12 14:59:13 +01:00
Côme Chilliet
9430899f16
Fix psalm issues related to signature changes from PHP 8.0
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-12-29 12:36:34 +01:00
Carl Schwan
5e31ed4f52 Add comments
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-12-05 15:26:36 +01:00
Carl Schwan
754cb58b12 Fix migration to non-empty secret
Add a fallback for empty keys

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-12-05 11:28:52 +01:00
Robin Appelman
ed8fedc685
fix s3 directory copy
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-11-15 17:17:59 +01:00
Côme Chilliet
9ba9f9a7dc
Make sure to not pass null to DateTime::createFromFormat
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-11-14 16:23:50 +01:00
Carl Schwan
a5ea677370 Rename file1 and file2 to source and target in Storage abstraction
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-10-18 17:21:47 +02:00
Carl Schwan
732badf552 Additional type hinting found by psalm
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-10-18 12:28:34 +02:00
Carl Schwan
9319bbb00c More type safety
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-10-17 11:53:11 +02:00
Carl Schwan
c2c63a551f Fix usage of streams
always return a bool and type the handle as a string

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-10-17 10:58:27 +02:00
Carl Schwan
74e6976779 Use argument name from parent class
This will be an issue with php 8, so best to fix it now

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-10-17 10:58:27 +02:00
Carl Schwan
c94f9f5e5f Add corresponding interface to trait
Since we can't specify that we want a class implementing a trait yet in
PHP

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-10-17 10:58:27 +02:00
Carl Schwan
cf1381a6f9 Port away from deprecated clearBucket call
This was removed a long time ago in the library that we use, but never
detected since this was inside a try catch block...

Remove the call for now and we should investigate newer api in the
future.

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-10-16 23:39:49 +02:00
Carl Schwan
1d90f84141 Port to LoggerInterface
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-10-16 23:39:28 +02:00
Carl Schwan
ff4c8e9bee Force cast getCode to int
Otherwise psalm complains that the type can also be a non-falsy-string

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-10-16 23:38:31 +02:00
Carl Schwan
386ef04e42 Fix too many arguments in LegacyDependencyCheckPolyfill
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-10-16 23:29:38 +02:00
luz paz
9d26671f05 Fix typos in apps/ subdirectory
Found via `codespell -q 3 -S l10n,./apps/files_external/3rdparty -L adn,ba,boxs,keypair,jus,optionel,ressource,tabel ./apps/`

Signed-off-by: luz paz <luzpaz@github.com>
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
2022-09-05 12:59:54 +00:00
Matthieu Gallien
54c05bcdb9 handle AccessDenied error when checking if external s3 support versions
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2022-07-28 09:20:12 +00:00
Carl Schwan
d5c23dbb9f Move CappedMemoryCache to OCP
This is an helpful helper that should be used in more place than just
server and this is already the case with groupfodlers, deck, user_oidc
and more using it, so let's make it public

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-07-14 15:54:31 +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
f945c0cbc6 Add a public replacement for OC::$server->get
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-05-10 18:51:12 +02:00
Vincent Petry
bccb69f806
Merge pull request #30860 from nextcloud/smb-getdirectory-content-catch
handle notfound and notpermitted error in Smb::getDirectoryContent
2022-04-14 20:26:17 +02:00
Côme Chilliet
ea23523c70
Adapt more code to migration to LoggerInterface
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-03-24 16:21:25 +01:00
Robin Appelman
ec4be7f2be
Merge pull request #31215 from nextcloud/smb-directory-invalid-type
handle invalid type when listing directory in smb
2022-03-17 16:25:26 +00:00
Erik van Velzen
17f3e5e4b5 AmazonS3: allow not implemented versioning
In case the S3 implementation does not implement versioning, set it to
false. Versioning was introduced in Nexcloud in commit
09ffac5e6d

This is needed for compatibility with the Storj gateway.

Signed-off-by: Erik van Velzen <erik@evanv.nl>
2022-03-15 00:40:38 +01:00
John Molakvoæ
e81eaf45d2
Prevent reading key on SFTP stat bool
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
2022-03-11 10:54:52 +01:00
Robin Appelman
a6f245f6ff
type hint as generator
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-03-04 16:26:08 +01:00
Robin Appelman
5b77099612
handle invilid type when listing directory in smb
just handle it as an empty directory

Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-03-04 15:49:00 +01:00
Robin Appelman
e2aa283dba
handle notfound and notpermitted error in Smb::getDirectoryContent
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-02-11 17:23:54 +01:00
howardZa
5c821c7136 Add SCHEME_NULL to list of allowed auth mechanism
Add Auth::Mechanism::SCHEME_NULL to list of allowed auth mechanism for AmazonS3 backend to allow attaching S3 storage to nextcloud instances running on already authorized instances (e.g. EC2 instances with IAM Instance roles)

Signed-off-by: Wolfram Gries <wolfram.gries@zapooflex.net>
2022-02-07 13:42:12 +01:00
Louis Chemineau
6220042788 Fix php:cs
Signed-off-by: Louis Chemineau <louis@chmn.me>
2022-01-26 10:47:16 +01:00
Carl Schwan
9a32672c26
Fix accessing undefined offsets
Move this to inside the else clause of the count($matches)

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-01-21 13:59:10 +01:00
Valdnet
31743438cd
l10n: Change to a capital letter
Signed-off-by: Valdnet <47037905+Valdnet@users.noreply.github.com>
2022-01-21 08:17:19 +01:00
Robin Appelman
0bed61f949
update to release smb lib
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-01-20 16:08:55 +01:00
Arthur Schiwon
a836aa34a6
add changes from Sebastian/dassIT and move default_realm to backend
- Sebastian added the switch depending on the preg_match result and with it
  the fall back to login credentials
- I turned default_realm to a backend option (was previously suggested as
  system config key)

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2022-01-20 16:08:44 +01:00
Arthur Schiwon
a96d461988
add KerberosApacheAuth support to files_external
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2022-01-20 16:08:34 +01:00
Carl Schwan
890af1917e
Merge pull request #29923 from alacn1/fix_basicauth_must_be_string
Fix users can't login external mount user entered credentials not set
2022-01-14 16:13:21 +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
Anderson Luiz Alves
4e65441cb2 files_external SMB: throw InvalidArgument when user is not set
Signed-off-by: Anderson Luiz Alves <alacn1@gmail.com>
2021-12-03 10:57:00 -03:00