nextcloud/apps/files_external/lib/Lib
Daniel Calviño Sánchez c360c208ee 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-07-11 08:16:07 +02:00
..
Auth chore: apply changes from Nextcloud coding standards 1.1.1 2023-11-23 10:36:13 +01:00
Backend fix: Allow to disable multipart copy on external s3 storage 2024-03-21 16:45:33 +01:00
Config Update php licenses 2021-06-04 22:02:41 +02:00
Notify Update php licenses 2021-06-04 22:02:41 +02:00
Storage fix: Do not log an error when connecting to SFTP without a logged in user 2024-07-11 08:16:07 +02:00
DefinitionParameter.php Extend ext storage params to contain default value 2023-01-13 10:27:17 +01:00
DependencyTrait.php Update php licenses 2021-06-04 22:02:41 +02:00
FrontendDefinitionTrait.php More type safety 2022-10-17 11:53:11 +02:00
IdentifierTrait.php Add corresponding interface to trait 2022-10-17 10:58:27 +02:00
IFrontendDefinition.php More type safety 2022-10-17 11:53:11 +02:00
IIdentifier.php Add corresponding interface to trait 2022-10-17 10:58:27 +02:00
InsufficientDataForMeaningfulAnswerException.php Update php licenses 2021-06-04 22:02:41 +02:00
LegacyDependencyCheckPolyfill.php Additional type hinting found by psalm 2022-10-18 12:28:34 +02:00
MissingDependency.php More type safety 2022-10-17 11:53:11 +02:00
PersonalMount.php Rename numericStorageId to numericExternalStorageId in PersonalMount.php 2023-05-07 04:47:44 +02:00
PriorityTrait.php Add corresponding interface to trait 2022-10-17 10:58:27 +02:00
SessionStorageWrapper.php Update php licenses 2021-06-04 22:02:41 +02:00
StorageConfig.php refactor: Rename OpenAPI type aliases to their namespaces 2023-11-02 11:37:15 +01:00
StorageModifierTrait.php Update php licenses 2021-06-04 22:02:41 +02:00
VisibilityTrait.php Update php licenses 2021-06-04 22:02:41 +02:00