masneyb / gftp

gFTP is a free multithreaded file transfer client for *NIX based machines. 56 language translations available.
http://www.gftp.org
MIT License
116 stars 20 forks source link

Segmentation fault on connecting after bookmark change #117

Closed MartinX3 closed 2 years ago

MartinX3 commented 3 years ago
  1. A bookmark with FTPS exist.
  2. I try to connect to it.
  3. Connection is not possible, because gFTP said, that the SSL support is not compiled in.
  4. I edit the bookmark to use SSH2.
  5. I try to connect to the bookmark.
  6. Segmentation fault.

After the crash I can connect to the server.

wdlkmpx commented 2 years ago

Oops

wdlkmpx commented 2 years ago

gFTP doesn't support recent OpenSSL versions, a year ago I tried to update the configure.ac openssl check and it wouldn't compile.

I think most people use sftp (SSH2) instead of FTPS, so it's not a big issue I guess.

I'll see if I can see fix the crash

wdlkmpx commented 2 years ago

I bet this crash also happens in the old gftp 2.0.19, but it should be fixed now.

In the Edit_bookmark_entry dialog you can also choose some exotic protocols, "Local", "Bookmark", these 2 should be hidden.

hk3f commented 2 years ago

The requirement for ftps is the android phone file transfering. I used ftp/ftps server in android. I can not enable ftps after trying to add --enable-ssl option in configuration. Filezilla suports ftps well but it always give annoying certification/secure prompt in recent versions.

wdlkmpx commented 2 years ago

FTPS support should work (in newer systems) after commit https://github.com/masneyb/gftp/commit/31acfeb3047ce0374e3571da315a221ad704d3b2

It works for me on Debian stretch, openssl 1.1, there is no prompt, you have to disable SSL verification in the preferences dialog

hk3f commented 2 years ago

I tried latest code and get stucked at login to FTPS server. Environment : Archlinux 5.14.14-arch1-1 #1 SMP PREEMPT Wed, 20 Oct 2021 21:35:18 +0000 x86_64 GNU/Linux Openssl OpenSSL 1.1.1l 24 Aug 2021 SSL verifcation disabled in preference dialog SSL Engine->Verify SSL Peer.

Tried to connect FTPS server of filezilla server and get log: Looking up 10.241.15.216 Trying 10.241.15.216:2121 Connected to 10.241.15.216:2121 Disconnecting from site 10.241.15.216 Waiting 30 seconds until trying to connect again

server side log: (000051)2021/10/29 13:00:58 - (not logged in) (10.241.15.225)> Connected on port 2121, sending welcome message... (000051)2021/10/29 13:00:58 - (not logged in) (10.241.15.225)> 220-FileZilla Server 0.9.60 beta (000051)2021/10/29 13:00:58 - (not logged in) (10.241.15.225)> 220-written by Tim Kosse (tim.kosse@filezilla-project.org) (000051)2021/10/29 13:00:58 - (not logged in) (10.241.15.225)> 220 Please visit https://filezilla-project.org/ (000051)2021/10/29 13:01:59 - (not logged in) (10.241.15.225)> 421 Login time exceeded. Closing control connection. (000051)2021/10/29 13:01:59 - (not logged in) (10.241.15.225)> disconnected.

Another android phone FTPS server app get the same result.

wdlkmpx commented 2 years ago

Screenshot(3)

It's buggy or broken, but it seems to work with a local server, vsftpd. I guess it works under certain conditions, using legacy protocol communications with a specific encryption method. I'm just speculating since this stuff is uncharted territory

Screenshot(2)