-
Notifications
You must be signed in to change notification settings - Fork 244
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
Bugfix: Use original socket to connect when using 'implicit' secure mode #171
base: master
Are you sure you want to change the base?
Conversation
FYI this is a bug fix, not a feature request. |
bump. is this repo not maintained anymore? |
Hi @kellym , Hope you are doing fine.
When using FTP Client such as FileZilla, it can do the listing, put file, etc. Here is my config in node : This is piece of my simple code to test directory listing. `this._FTPClient = new FTP();
Is my config is wrong ? Is there any other thing that I need to check ? |
Thanks @kellym. Although your fix didn't suffice to make it work with Filezilla Server (it bumps in other issues), it did make a successfull connection to trs/ftp-srv (which has explicit FTPS broken). I'm developing server and client altogether, FTPS mandatory, so for anyone trying this fix and getting errors, it may be worth giving a try with ftp-srv. |
This PR works for me with FileZilla server up until now. I can both My knowledge of the module and FTPS does not suffice to say whether the PR poses any problems. |
@kellym Thanks, works great |
Can we get this merged in please |
@kellym Can you publish your fork to npm? you should call it |
implicit connection working mscdex#171 https://www.reddit.com/r/node/comments/6a6j67/ftp/
Currently, implicit FTPS mode is broken.
When using implicit FTPS, the current code assigns the returned socket from
tls.connect
tothis._socket
, which is used to make the initial connection.The problem is that the TLSSocket expects the original socket passed in to make the connection. Since it doesn't, the socket never actually connects and it always ends in a timeout.
I ran into this with a client this past week, and there's a StackOverflow question that is unanswered regarding this same problem. It appears there are no tests for connecting, but I've verified that I'm able to connect to our client's implicit FTPS server with this change.