nextcloud/apps/files_external/lib
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
..
AppInfo chore: Add SPDX header 2024-06-06 18:05:37 +02:00
BackgroundJob chore: Add SPDX header 2024-06-06 18:05:37 +02:00
Command chore: Add SPDX header 2024-06-06 18:05:37 +02:00
Config chore: Add SPDX header 2024-06-06 18:05:37 +02:00
Controller chore: Add SPDX header 2024-06-06 18:05:37 +02:00
Lib fix: Do not log an error when connecting to SFTP without a logged in user 2024-06-18 07:06:30 +02:00
Listener chore: Add SPDX header 2024-06-06 18:05:37 +02:00
Migration chore: Add SPDX header 2024-06-06 18:05:37 +02:00
Service chore: Add SPDX header 2024-06-06 18:05:37 +02:00
Settings chore: Add SPDX header 2024-06-06 18:05:37 +02:00
MountConfig.php chore: Add SPDX header 2024-06-06 18:05:37 +02:00
NotFoundException.php chore: Add SPDX header 2024-06-06 18:05:37 +02:00
ResponseDefinitions.php chore: Add SPDX header 2024-06-06 18:05:37 +02:00