aaneto / ftp-client

A rust FTP client implementation.
MIT License
13 stars 4 forks source link

Panic when connecting to sfpt server: #8

Closed spebern closed 4 years ago

spebern commented 4 years ago

Hi,

First of all thank you for your effort writing an async ftp lib!

When connecting to https://hub.docker.com/r/atmoz/sftp/ the unwrap here fails. Because the server replies with: SSH-2.0-OpenSSH_7.4p1 Debian-10+deb9u4

Steps to reproduce:

docker pull atmoz/sftp
docker run -p 22:22 -d atmoz/sftp foo:pass:::upload
use tokio;
use ftp_client::client::Client;

#[tokio::main]
async fn main() {
    let _ = Client::connect_with_port("127.0.0.1", 22, "foo", "pass").await;
}
spebern commented 4 years ago

Sorry sftp != ftp + tls. What a brainfail from my side. :(

aaneto commented 4 years ago

Hey there, thanks for the input! There are some things that I did not take the time to but should have changed:

  1. Remove this unwrap at the parsing phase, this should be a more descriptive error.
  2. Release the async client on crates.io, right now it's just on the Github master branch.