Commit Graph

1166 Commits (00a7478d8df2007697d5caf2e0cb1c298afbb3fd)

Author SHA1 Message Date
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 +07: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 +07:00
Côme Chilliet 0c466b7ff5
Attempt at reducing psalm errors
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-01-20 11:22:09 +07: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 +07: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 +07: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 +07: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 +07: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 +07:00
Carl Schwan 5e31ed4f52 Add comments
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-12-05 15:26:36 +07: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 +07:00
Robin Appelman ed8fedc685
fix s3 directory copy
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-11-15 17:17:59 +07: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 +07: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 +07:00
Carl Schwan 732badf552 Additional type hinting found by psalm
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-10-18 12:28:34 +07:00
Carl Schwan 94a0b27000 Specify type to internal storage class
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-10-17 11:53:11 +07:00
Carl Schwan 7da806d6eb Fix returning null when getMessage return null
Don't overwrite $message but instead create another temporary variable

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-10-17 11:53:11 +07:00
Carl Schwan 9319bbb00c More type safety
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-10-17 11:53:11 +07:00
Carl Schwan 5b3509dc05 Fix type of getVisibilityType
This is a int not a string

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-10-17 10:58:27 +07: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 +07: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 +07: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 +07:00
Carl Schwan 2d75321c23 Add more typing to FilesExternal commands
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-10-17 10:58:25 +07: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 +07:00
Carl Schwan 1d90f84141 Port to LoggerInterface
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-10-16 23:39:28 +07: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 +07:00
Carl Schwan c4bb69c143 Specify that userId can be null
This fixes a psalm false-positive where the method is called with null, since
the method actually handle this correctly already

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-10-16 23:35:33 +07:00
Carl Schwan d4d1952f67 Fix return value of updateParent
Port to executeStatement to guarantee that we will return an int and
remove a deprecated method call at the same time

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-10-16 23:33:52 +07:00
Carl Schwan a40ca520d4 Port away from removed IDBConnection->isConnected method
Instead track if the reconnection was successful with return value of
connect method

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-10-16 23:32:55 +07:00
Carl Schwan 386ef04e42 Fix too many arguments in LegacyDependencyCheckPolyfill
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-10-16 23:29:38 +07: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 +07:00
Robin Appelman c2b206db64
add marker interface to mark system mount points for encryption
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-08-25 13:55:53 +07: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 +07: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 +07:00
Louis 259b2806bc
Merge pull request #32016 from nextcloud/fix/PasswordUpdatedEvent_handling
Use stored user for PasswordUpdatedEvent
2022-05-16 12:38:49 +07:00
Carl Schwan ec6b83cc18 Add stricter psalm type for CappedMemoryCache
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-05-12 15:06:18 +07: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 +07:00
Louis Chemineau 816e7827f0 Use stored user for PasswordUpdatedEvent
When handling PasswordUpdatedEvent event, we are calling getLoginName which does not exists.

This PR adds a condition to use the previously stored user when handling PasswordUpdatedEvent.

Signed-off-by: Louis Chemineau <louis@chmn.me>
2022-05-10 12:16:33 +07: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 +07:00
Joas Schilling b9949126ed
Fix case also when the table existed already
Signed-off-by: Joas Schilling <coding@schilljs.com>
2022-04-08 15:52:54 +07:00
Côme Chilliet dd357d7f9b
Merge pull request #31679 from nextcloud/bugfix/noid/ensure-string-columns-to-be-maximum-of-4000
Ensure string column limit of 4.000 characters
2022-03-31 11:37:43 +07:00
Côme Chilliet ddfa2f221e
Remove unneeded preSchemaChange and return null if no changes
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-03-31 10:19:48 +07:00
Côme Chilliet 765999f454
Merge pull request #31609 from nextcloud/fix/migrate-away-from-ilogger
Migrate from ILogger to LoggerInterface in lib/private
2022-03-29 09:39:38 +07:00
Joas Schilling 9d2536e49e
Fix files_external column length
Signed-off-by: Joas Schilling <coding@schilljs.com>
2022-03-25 12:44:51 +07:00
Robin Appelman 881e107543
Apply suggestions from code review
Co-authored-by: Louis <6653109+artonge@users.noreply.github.com>
Co-authored-by: Côme Chilliet <91878298+come-nc@users.noreply.github.com>

Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-03-24 17:41:37 +07:00
Robin Appelman fc6e4530c4
force full setup after external storage config change
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-03-24 17:03:44 +07:00
Robin Appelman 114af08043
Merge pull request #30991 from nextcloud/external-remove-config-migration
remove old legacy external storage migration logic
2022-03-24 16:00:33 +07: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 +07: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 +07: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 +07: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 +07:00