nextcloud/apps/files_external/lib/Lib
Daniel Calviño Sánchez 8c2f05f05e 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-10 15:17:47 +02:00
..
Auth chore: Improve phpdoc typing to silence psalm errors 2024-04-04 11:45:22 +02:00
Backend chore: Improve phpdoc typing to silence psalm errors 2024-04-04 11:45:22 +02: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-10 15:17:47 +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 fix: Apply new coding standard to all files 2024-04-04 11:45:22 +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 mark MOUNT_TYPE_PERSONAl as deprecated 2024-02-24 11:33:44 +01:00
StorageModifierTrait.php chore: Improve phpdoc typing to silence psalm errors 2024-04-04 11:45:22 +02:00
VisibilityTrait.php Update php licenses 2021-06-04 22:02:41 +02:00