Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with SimpleConnectivityChecker reliance on phpseclib's SSH2::isConnected functionality #1678

Open
kevinreniers opened this issue Jul 3, 2023 · 0 comments

Comments

@kevinreniers
Copy link

Bug Report

Q A
Flysystem Version 3.15.1
Adapter Name flysystem-sftp-v3
Adapter version 3.15.0

Summary

I've already described the issue in detail on the phpseclib/phpseclib issue tracker as well: phpseclib/phpseclib#1923. This issue also links to a consistent reproducer project.

In SimpleConnectivityChecker, the flysystem-sftp-v3 adapter relies on phpseclib3\Net\SFTP::isConnected to check that the underlying connection is still connected. If not, it will try to create a new one. However, for long-running processes where the underlying TCP/IP connection may have timed out after a while, this check fails because the exposed phpseclib3\Net\SFTP::isConnected functionality cannot/does not capture this case.

I'm also reporting this issue here because I believe your library should not rely (only?) on SFTP::isConnected. The maintainer of phpseclib gave a suggestion on their tracker on how to check the underlying socket as well, if that helps/ feels appropriate.

How to reproduce

I have a reproducer project that highlights the issue.

https://github.com/kevinreniers/phpseclib-iss1923

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant