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

Issues with ftps through CONNECT #8737

Closed
MarvinWinks opened this issue Apr 22, 2022 · 4 comments
Closed

Issues with ftps through CONNECT #8737

MarvinWinks opened this issue Apr 22, 2022 · 4 comments

Comments

@MarvinWinks
Copy link

@MarvinWinks MarvinWinks commented Apr 22, 2022

Using curl executable, directory listings against several ftps sites stopped working as of version 7.77 of curl. I tried compiling and testing against each of the versions from 7.76 to 7.82.

On versions 7.77 and after, the TLS handshake completes successfully. But the directory listing does not return.

I also tried writing a simple main.cpp using libcurl. I am finding that starting with v7.77, CURLOPT_WRITEFUNCTION does not get called.

I did this

I ran the curl executable to do a directory listing of an ftps site. Command-line options used:

-vv
-x
-u username:password
--ftp-ssl
--proxytunnel
<ftp site with scheme as ftp://>

I expected the following

The directory listing as output.

curl/libcurl version

I tried several versions:
Newest version that works: 7.76.1
curl 7.76.1 (x86_64-unknown-linux-gnu) libcurl/7.76.1 OpenSSL/1.0.2zd zlib/1.2.11 libssh2/1.9.0
Release-Date: 2021-04-14
Protocols: dict file ftp ftps gopher gophers http https imap imaps mqtt pop3 pop3s rtsp scp sftp smb smbs smtp smtps telnet tftp
Features: alt-svc AsynchDNS GSS-API HTTPS-proxy IPv6 Kerberos Largefile libz NTLM NTLM_WB SPNEGO SSL TLS-SRP UnixSockets

Newest version tried (that does not work): 7.82.0
curl 7.82.0 (x86_64-unknown-linux-gnu) libcurl/7.82.0 OpenSSL/1.0.2zd zlib/1.2.11 libssh2/1.9.0
Release-Date: 2022-03-05
Protocols: dict file ftp ftps gopher gophers http https imap imaps mqtt pop3 pop3s rtsp scp sftp smb smbs smtp smtps telnet tftp
Features: alt-svc AsynchDNS GSS-API HSTS HTTPS-proxy IPv6 Kerberos Largefile libz NTLM NTLM_WB SPNEGO SSL TLS-SRP UnixSockets

operating system

Linux 3.10.0-957.35.2.el7.x86_64 #1 SMP Wed Sep 18 05:51:28 EDT 2019 x86_64 x86_64 x86_64 GNU/Linux

@jay
Copy link
Member

@jay jay commented Apr 24, 2022

Is there a public server that we can use to reproduce?

@MarvinWinks
Copy link
Author

@MarvinWinks MarvinWinks commented Apr 25, 2022

@jay
Copy link
Member

@jay jay commented Apr 26, 2022

You can try bisecting.

@MarvinWinks
Copy link
Author

@MarvinWinks MarvinWinks commented Apr 28, 2022

Using git bisect with good=curl-7_76_1 and bad=curl-7_77_0, the offending commit was:

51c0ebc is the first bad commit
commit 51c0ebc
Author: Daniel Stenberg daniel@haxx.se
Date: Thu May 6 13:04:03 2021 +0200

http: deal with partial CONNECT sends

Also added 'CURL_SMALLSENDS' to make Curl_write() send short packets,
which helped verifying this even more.

Add test 363 to verify.

Reported-by: ustcqidi on github
Fixes #6950
Closes #7024

:040000 040000 848f646d0ebde49b473ed2d88daa90ffe33b1455 c00d1ac405a2518a5d278946e66f708a958ff28c M lib
:040000 040000 66349509dfc8e8765c2650dafa865f810da693b7 e741180725e5e0473e53c705e599df00e0325b52 M tests

@bagder bagder changed the title Issues with ftps starting with version 7.77.0 of curl Issues with ftps through CONNECT Apr 30, 2022
@bagder bagder closed this as completed in 71bbabb Jun 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants