wolfSSL / wolfssh

wolfSSH is a small, fast, portable SSH implementation, including support for SCP and SFTP.
https://www.wolfssl.com
367 stars 88 forks source link

connection check on wolfSSH_SFTP_STAT #707

Closed kojo1 closed 2 months ago

kojo1 commented 3 months ago

https://wolfssl.zendesk.com/agent/tickets/17964 Issue: wolfSSH_SFTP_STAT doesn't check the server connection in it. If it is disconnected after wolfSSH_connect, the API alone doesn't detect the disconnection and return WS_SUCCESS.

The issue is only the case wolfSSH_SFTP_STAT alone is used. sftpclient uses wolfSSH_SFTP_STAT with stream read/write so it detects the missing connection.