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
Getting a directory listing from a FTPS Server hanging on Windows / SChannel #9161
Comments
I've been doing a bit more digging on this one, and it seems that the problem is partly down to the behaviour of the server. With a different FTP server, after getting the directory listing, the next call to "select" returns 1, and somewhere recv_sspi_close_notify is being get set to true. On this ftp server, the "select" call returns 0, and curl seems to keep calling select until it turns to 1, which it never will. |
Edited 25/07/2022:- The issue does not occur with vsftpd installed from here https://hub.docker.com/r/bfren/ftps The server it worked on was an example of "Microsoft FTP Service" that I found online. |
I couldn't get the docker working for this. If you have a step by step way to reproduce without docker I will try that. |
- Remove "2.12 FTPS with Schannel times out file list operation" - Remove "7.12 FTPS directory listing hangs on Windows with Schannel" - Add "7.12 FTPS server compatibility on Windows with Schannel" This change adds a more generic bug description that explains FTPS with the latest curl and Schannel is not widely used and may have more bugs than other TLS backends. The two removed FTPS Schannel bugs can't be reproduced any longer and were likely fixed by 24d6c28. Ref: curl#5284 Ref: curl#9161 Ref: curl#12894 Closes #xxxx
- Remove "2.12 FTPS with Schannel times out file list operation" - Remove "7.12 FTPS directory listing hangs on Windows with Schannel" - Add "7.12 FTPS server compatibility on Windows with Schannel" This change adds a more generic bug description that explains FTPS with the latest curl and Schannel is not widely used and may have more bugs than other TLS backends. The two removed FTPS Schannel bugs can't be reproduced any longer and were likely fixed by 24d6c28. Ref: #5284 Ref: #9161 Ref: #12894 Closes #13032
I did this
I set up a local ftps server following these instructions.
https://itnext.io/using-a-local-ftps-server-for-testing-6f2d77873bab
And uploaded some files to it (the problem does not occur if there are no files on the server, but it doesn't seem to matter what files you upload)
I build libcurl using vcpkg on windows, and created and ran the attached program to get the file listing from the remote server. It works correctly on Linux but not in Windows, when curl is compiled with schannel as opposed to OpenSSL.
I got similar results from running:-
curl --ssl-reqd -k --insecure ftp://localhost:21/ --user "foo:pass" --verbose
I expected the following
I expected the program to exit after displaying the file listing, but it hangs indefinitely.
curl/libcurl version
libcurl/7.84.0-DEV Schannel zlib/1.2.12
[curl -V output]
operating system
Windows 10 21H2
Source.cpp.txt
The text was updated successfully, but these errors were encountered: