Commit graph

279 commits

Author SHA1 Message Date
Git'Fellow
b1e71ae646 fix(sftp): Handle empty port parameter to allow host-defined ports
Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
2026-02-14 12:29:38 +01:00
pac0san
e48f871bd0
fix(files_external): Respect explicit port configuration
It allows the use of the alternative SFTP port defined in the GUI (external storage), instead of the default port (22).

Signed-off-by: pac0san <7056343+pac0san@users.noreply.github.com>
Signed-off-by: provokateurin <kate@provokateurin.de>
2026-02-02 11:27:42 +01:00
Robin Appelman
4dcd4223de fix: make smb auth failure on forbidden exception more reliable
Signed-off-by: Robin Appelman <robin@icewind.nl>
2026-01-12 15:23:57 +01:00
Robin Appelman
43727cb72c fix: handle InvalidArumentException as availability failure in smb->getFileInfo
Signed-off-by: Robin Appelman <robin@icewind.nl>
2026-01-12 15:23:57 +01:00
Carl Schwan
2ea1bd4cdc
feat(movie-preview): Use getDirectDownloadById for generating preview
Allow to speed-up considerably the creation of previews for movies
stored on S3.

Signed-off-by: Carl Schwan <carlschwan@kde.org>
2026-01-02 17:13:41 +01:00
invario
ffe91b48dc
feat(previews): allow ffmpeg to connect direct for AWS S3 buckets
Co-authored-by: Côme Chilliet <91878298+come-nc@users.noreply.github.com>
Signed-off-by: invario <67800603+invario@users.noreply.github.com>
2026-01-02 10:48:39 +01:00
Kent Delante
b57db10814 fix: pass only necessary information when deleting mulitple objects
DeleteObjects currently fails when the request includes all the
information returned by ListObjects. Send only the necessary
information in the request. Note: 'Size' and 'DateModified' is now
only supported by directory buckets.

Signed-off-by: Kent Delante <kent.delante@proton.me>
2025-11-18 12:07:53 +08:00
Ferdinand Thiessen
660f3f6fd1
refactor: use logical && || instead of weak and or operators
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2025-09-27 23:02:18 +02:00
Robin Appelman
6f0120af16
fix: handle smb timeouts as storage not available
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-08-05 17:39:12 +02:00
Ferdinand Thiessen
5981b7eb51
chore: apply new CSFixer rules
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>

# Conflicts:
#	apps/settings/lib/SetupChecks/PhpOpcacheSetup.php
2025-07-01 16:26:50 +02:00
Robin Appelman
4242520d64
feat: improve logging of fopen failures for smb
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-06-10 15:14:04 +02:00
Git'Fellow
2d68644e11 fix(files_external): Safely check if the timestamp is numeric
Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
2025-05-08 11:46:52 +02:00
provokateurin
e9e67cbc50
fix(files_external): Stop building path twice when checking if file exists on case insensitive SMB storage
Signed-off-by: provokateurin <kate@provokateurin.de>
2025-03-10 09:52:32 +01:00
Côme Chilliet
64863c9d46
chore: Apply new rector configuration to apps folder
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-02-13 11:46:42 +01:00
Côme Chilliet
ed5b7ae161
chore: re-apply current rector configuration to apps folder
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-02-13 11:45:33 +01:00
Robin Appelman
1871296041 fix: don't believe sftp when it tells us the mtime is less than we know it is
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-02-05 20:50:19 +01:00
Christian Becker
c25c5bbc00
feat(S3): add SSE-C support in S3 External Storage
Just need to add the parameter and fix two calls. All other logic is already implemented and implicitly called through the S3ConnectionTrait

fixes #33283

Signed-off-by: Christian Becker <christian@dabecka.de>
Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
2025-01-28 22:57:59 +01:00
Robin Appelman
4179abdb81
fix: detect deleted items as updated for smb storage
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-01-21 17:56:46 +01:00
Robin Appelman
cc39714fb5
fix: smb: don't fail hard if we can't load acls for a file
Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-11-14 16:01:36 +01:00
provokateurin
0de4843b73 refactor(Storage): Align all Storage constructors
Signed-off-by: provokateurin <kate@provokateurin.de>
2024-10-23 13:24:18 +02:00
provokateurin
381077028a
refactor(apps): Use constructor property promotion when possible
Signed-off-by: provokateurin <kate@provokateurin.de>
2024-10-21 12:37:59 +02:00
Côme Chilliet
1580c8612b
chore(apps): Apply new rector configuration to autouse classes
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2024-10-15 10:40:25 +02:00
provokateurin
14e6734547
refactor(files_external): Add Storage parameter strong types
Signed-off-by: provokateurin <kate@provokateurin.de>
2024-10-07 15:00:07 +02:00
Robin Appelman
103b464eea fix: use nc's binary finding logic for smb
Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-10-04 15:56:31 +02:00
provokateurin
1302b48ca2
fix(files_external): Fix all IStorage return types
Signed-off-by: provokateurin <kate@provokateurin.de>
2024-09-26 17:29:48 +02:00
Marcel Klehr
c8a90e941a 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 09:03:08 +02:00
Côme Chilliet
1a4978c4ea
chore: Apply rector configuration to apps folder
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2024-09-20 17:51:00 +02:00
Git'Fellow
07a6fd11d0
fix(files_external): Check key exists before accessing it
Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
2024-09-14 11:21:17 +02:00
Daniel Kesselberg
af6de04e9e
style: update codestyle for coding-standard 1.2.3
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2024-08-25 19:34:58 +02:00
John Molakvoæ
d35c4eb911
Merge branch 'master' into jr-readdir-false-false
Signed-off-by: John Molakvoæ <skjnldsv@users.noreply.github.com>
2024-08-16 10:53:50 +02: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 +02: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 +02:00
Andy Scherzinger
c1555fc33e
chore: Add SPDX header
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2024-06-06 18:05:37 +02: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 +02: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 +02: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 +02: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 +02:00
John Molakvoæ
524ed97d62
fix: replace Account name by Login
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
2024-02-13 21:08:10 +01: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 +01: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 +01: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 +01: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 +01:00
Louis Chemineau
e66e8bad1a
Return correct status if touch failed
Signed-off-by: Louis Chemineau <louis@chmn.me>
2023-10-23 15:26:43 +02: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 +02:00
Robin Appelman
eab8dd3ca0 use multipart copy for s3
Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-09-20 17:28:48 +02:00
Robin Appelman
d42d809170 sftp psalm fixes
Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-09-18 16:12:03 +02:00
Robin Appelman
c264903cb9
psalm suppress
Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-09-04 16:30:12 +02:00
Robin Appelman
aa2a3ae6c8
implement fseek for sftp read stream
Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-09-04 16:30:11 +02:00
Robin Appelman
b41c8e0ef5
more optimized getPermissions/getMetaData
Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-09-04 16:30:10 +02: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 +02:00