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

SFTP clients should not rely on ssh commands #15

Open
drakkan opened this issue Oct 24, 2019 · 1 comment
Open

SFTP clients should not rely on ssh commands #15

drakkan opened this issue Oct 24, 2019 · 1 comment

Comments

@drakkan
Copy link

drakkan commented Oct 24, 2019

Describe the bug
When you create a new connection and leave the path empty the default value is ~ and this result in sending an ssh exec command to the SFTP server. An SFTP server could disable exec at all and so the app hangs and don't return the list of files.

I think the code that produces this behaviour is this (not tested):

https://github.com/niklas-8/RemoteFiles/blob/master/lib/services/connection_methods.dart#L87

To Reproduce
Steps to reproduce the behavior:

  1. Download and start sftpgo (https://github.com/drakkan/sftpgo). You have the same problem with any SFTP only server
  2. Create an user a try to login
  3. The file list hangs if you don't set a path in the connection page

Expected behavior
An SFTP client should not rely on ssh command but only on SFTP commands.
I suggest to get the current directory using the SFTP command if no path is given

@drakkan drakkan changed the title SFTP clients should not rely on ssh command SFTP clients should not rely on ssh commands Oct 25, 2019
@drakkan
Copy link
Author

drakkan commented Nov 18, 2019

I added a workaround in sftpgo

drakkan/sftpgo@9c4dbbc

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