Commit Graph

348 Commits (a4e2a7bb7bca8a374dd5d644c0c191dedfca9201)

Author SHA1 Message Date
Maxence Lange 7e0ef243e8 fix(files-external): set password as sensitive
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
2024-10-31 11:17:30 +07:00
Louis Chemineau 9668f48bd7 fix: Use hashed password in files_external settings
Signed-off-by: Louis Chemineau <louis@chmn.me>
2024-09-26 13:04:58 +07:00
Marcel Klehr 3b29a3959e fix(files_external): Catch correct exception
SMB#getFileInfo used to throw an icewind/smb exception, but nowadays throws \OCP\Files\ForbiddenException. This fixes downstream methods to catch the new exception.

Signed-off-by: Marcel Klehr <mklehr@gmx.net>
2024-09-26 07:37:40 +07:00
Ferdinand Thiessen 7537b5bcc4
Merge pull request #47923 from nextcloud/backport/47527/stable30
[stable30] fix(files_external): Handling in SFTP UI for custom ports
2024-09-14 22:52:01 +07:00
Git'Fellow 8a7cd1aefb fix(files_external): Check key exists before accessing it
Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
2024-09-14 16:57:21 +07:00
Josh Richards 600fc1d4df fix: custom port handling in UI for SFTP
Signed-off-by: Josh Richards <josh.t.richards@gmail.com>
2024-09-12 13:37:07 +07:00
Daniel Calviño Sánchez 61b64b109c fix: Fix unmodified placeholder replacing the actual value when updating
When updating global storages and user storages a property is not
updated by "StoragesService::updateStorage()" if the value matches the
unmodified placeholder. However, userglobal storages are not updated
through the "StoragesService"; as only the authentication mechanism is
updated it is directly done with "saveBackendOptions()" in
"IUserProvided" or "UserGlobalAuth". Due to this the unmodified
placeholder value needs to be explicitly checked in those cases and
replaced by the actual value (note that in this case it is not possible
to just skip updating a specific property).

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2024-09-04 10:11:59 +07:00
Robin Appelman c2b1f079b1
feat: add a specialized writeStream implementation for s3 external storage
Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-07-24 17:37:20 +07:00
Daniel Calviño Sánchez 733e3f62fd fix: Do not log an error when connecting to SFTP without a logged in user
When connecting to a SFTP server from a SFTP storage the host key is
checked against the known host keys stored in a file in the data
directory of the logged in Nextcloud user. The path to the file is
(indirectly) got using "OC_App::getStorage", which logs an error if
called when there is no logged in user; this can happen, for example, if
the storage is used from a background job or a command.

Not being able to read or write the file just causes the host key check
to be skipped, but it has no other consequence. Moreover, even with
logged in users it is likely that the file can not be read either and
the check is also skipped, as the file needs to have been manually
created by an admin.

Due to all that now the path to the file is directly created using a
View rather than relying on "OC_App::getStorage" to prevent the unneeded
error from being logged.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2024-06-18 07:06:30 +07:00
Andy Scherzinger c1555fc33e
chore: Add SPDX header
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2024-06-06 18:05:37 +07:00
Côme Chilliet 4d060818d1
fix(files_external): Be extra safe with null handling to please psalm
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2024-04-30 09:24:00 +07:00
Côme Chilliet 72a0da6d4e fix: Fix small psalm errors in FTP and LDAP connections
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2024-04-09 10:01:47 +07:00
Côme Chilliet 0f348516d2 fix: Remove obsolete resource typing
In PHP>=8.1, LDAP and FTP resources are always typed objects

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2024-04-09 10:01:47 +07:00
Côme Chilliet 81319e78bf chore: Improve phpdoc typing to silence psalm errors
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2024-04-02 14:16:21 +07:00
Côme Chilliet ec5133b739 fix: Apply new coding standard to all files
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2024-04-02 14:16:21 +07:00
Julius Härtl d576b8eaf9 fix: Allow to disable multipart copy on external s3 storage
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2024-02-24 17:11:07 +07:00
Maxence Lange 2f41b9c092 mark MOUNT_TYPE_PERSONAl as deprecated
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
2024-02-24 11:33:44 +07:00
Maxence Lange 1a5b545fe8 full uppercase const
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
2024-02-24 11:33:44 +07:00
John Molakvoæ 524ed97d62
fix: replace `Account name` by `Login`
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
2024-02-13 21:08:10 +07:00
Vincent Petry 839ddaa354
feat: rename users to account or person
Replace translated text in most locations

Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2024-02-13 21:06:30 +07:00
Benjamin Gaussorgues 2cb0bf5437
fix(files_external): list root when using SMB case-insensitive option
Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
2024-02-05 11:24:12 +07:00
Valdnet 9064171b27 Correct a typo
Signed-off-by: Valdnet <47037905+Valdnet@users.noreply.github.com>
2023-11-28 15:48:58 +07:00
Joas Schilling aa5f037af7
chore: apply changes from Nextcloud coding standards 1.1.1
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
2023-11-23 10:36:13 +07:00
jld3103 755de1e0b5 refactor: Rename OpenAPI type aliases to their namespaces
Signed-off-by: jld3103 <jld3103yt@gmail.com>
2023-11-02 11:37:15 +07:00
Benjamin Gaussorgues c52d5e418a
Merge pull request #41053 from nextcloud/bug/smb/in-place-case-rename
fix(files_external): on case insensitive system, block case change
2023-10-31 16:07:29 +07:00
Louis Chemineau e66e8bad1a
Return correct status if touch failed
Signed-off-by: Louis Chemineau <louis@chmn.me>
2023-10-23 15:26:43 +07:00
Benjamin Gaussorgues a45e12abc8
fix(files_external): on case insensitive system, block case change
When a file/directory is renamed to the same name with only case change,
the rename fail. We block this kind of rename.
The user will have to rename to another name first.

Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
2023-10-23 10:32:28 +07:00
Robin Appelman eab8dd3ca0 use multipart copy for s3
Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-09-20 17:28:48 +07:00
Robin Appelman d42d809170 sftp psalm fixes
Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-09-18 16:12:03 +07:00
Robin Appelman c264903cb9
psalm suppress
Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-09-04 16:30:12 +07:00
Robin Appelman aa2a3ae6c8
implement fseek for sftp read stream
Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-09-04 16:30:11 +07:00
Robin Appelman b41c8e0ef5
more optimized getPermissions/getMetaData
Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-09-04 16:30:10 +07:00
Robin Appelman 1dfef9fccf
sftp optimize file_put_contents, writeStream and copy
Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-09-04 16:30:10 +07:00
Robin Appelman 9cf732a90b
fix error during sftp stream close
Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-09-04 16:30:09 +07:00
Robin Appelman 19daa70947
clear sftp stat cache when opening a write stream
Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-09-04 16:30:07 +07:00
Vincent Petry 8d1a3daa3f Allow ext storage Local to go unavailable
Whenever an external storage of type Local points at a non-existing
directory, process this as a StorageNotAvailable instead of returning
404.

This makes desktop clients ignore the folder instead of deleting it when
it becomes unavailable.

The code change was limited to external storages to avoid issues during
setup and with the default home storage.
Signed-off-by: Vincent Petry <pvince81@yahoo.fr>
2023-08-29 11:04:31 +07:00
jld3103 a7808f0115
files_external: Fix OpenAPI
Signed-off-by: jld3103 <jld3103yt@gmail.com>
2023-08-07 08:42:19 +07:00
John Molakvoæ 38480fda3c
feat(files_external): migrate to vue
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
2023-08-01 16:38:06 +07:00
Benjamin Gaussorgues 9b03dc52a4
Migrate files external to PSR LoggerInterface
Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
2023-08-01 09:44:57 +07:00
Robin Appelman 31f1ff87d0
Merge pull request #39367 from nextcloud/s3-fopen-exception
handle more exceptions in AmazonS3::fopen
2023-07-20 19:32:03 +07:00
Robin Appelman 7c9edbff32
handle more exceptions in AmazonS3::fopen
Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-07-13 15:37:42 +07:00
jld3103 bb1e73de97
files_external: Add OpenAPI spec
Signed-off-by: jld3103 <jld3103yt@gmail.com>
2023-07-11 17:22:35 +07:00
Simon L 83faba5e61
Merge pull request #38591 from nextcloud/fix/caching/avoid-haskey-get
fix(caching): Avoid checking existence before fetching
2023-06-12 13:53:37 +07:00
Christoph Wurst b8c61b3515 fix(caching): Avoid checking existence before fetching
The cache might expire between checking for key existence and fetching
the value. In this rare case the code continues with a null value when
it doesn't expect one.

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2023-06-12 09:44:48 +07:00
Faraz Samapoor 94f2f57519
Update apps/files_external/lib/Lib/Storage/SMB.php
Co-authored-by: Côme Chilliet <91878298+come-nc@users.noreply.github.com>
Signed-off-by: Faraz Samapoor <f.samapoor@gmail.com>
2023-06-05 16:21:14 +07:00
Faraz Samapoor cfb921b26c Refactors "strpos" calls in /apps/files_external to improve code readability.
Signed-off-by: Faraz Samapoor <f.samapoor@gmail.com>
2023-06-02 19:54:49 +07:00
Simon L fa4d153610
Merge pull request #38115 from DerGenaue/patch-1
Rename `numericStorageId` to `numericExternalStorageId` in PersonalMount.php
2023-05-16 19:08:39 +07: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 +07: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 +07:00
James Guo bb173e092b
Update AmazonS3.php
Signed-off-by: James Guo <i@ze3kr.com>
2023-04-06 14:34:08 +07:00