Skip to content

SFTP clients should not rely on ssh commands #15

@drakkan

Description

@drakkan

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions