Skip to content

Conversation

@backportbot
Copy link

@backportbot backportbot bot commented Jun 24, 2024

Backport of PR #45938

@blizzz blizzz mentioned this pull request Jun 24, 2024
@artonge artonge force-pushed the backport/45938/stable29 branch from 5b54ce2 to 68709c1 Compare June 25, 2024 12:24
@artonge artonge removed the 3. to review Waiting for reviews label Jun 25, 2024
@artonge artonge force-pushed the backport/45938/stable29 branch from 68709c1 to d9734a9 Compare June 30, 2024 16:21
@Altahrim Altahrim mentioned this pull request Jul 10, 2024
…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 <[email protected]>
@AndyScherzinger AndyScherzinger force-pushed the backport/45938/stable29 branch from d9734a9 to 8c2f05f Compare July 10, 2024 13:17
@AndyScherzinger AndyScherzinger merged commit f22f127 into stable29 Jul 10, 2024
@AndyScherzinger AndyScherzinger deleted the backport/45938/stable29 branch July 10, 2024 18:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants