-
Notifications
You must be signed in to change notification settings - Fork 15
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
FtpS and FtpES connections do not necessarily secure data sockets #35
Comments
So it sounds like we need to send these commands when SSL is required? |
I think that's right, and much simpler. PBSZ 0 seems a bit odd but the idea of the protected buffer doesn't make much sense with SSL. |
There is a
|
The version 1.12 (just released) does |
They should only be sent once per session. I didn't realise setting I think the server I was using didn't report It might be worth sending PBSZ and PROT even if servers don't report the capability but not failing is they return errors. Feel free to close as I can no longer test this. |
I keep the issue open, and I'll add a flag to force |
If you set
ChannelProtection
to containFtpProtection.DataChannel
the library never explicitly informs the server of this.Some servers do not by default use SSL on the data channel even if it is being used on the command channel.
This can result in the server sending unencrypted data which is picked up by
System.Net.Security.SslStream.AuthenticateAsClient
and causes the exception seen above as the data is not a valid SSL handshake.FtpSession.CheckProtection
should, ifState["PROT"]
does not equal the desired protection level, issue aPROT
command and fail on a non 2xx response code.State["PROT"]
should not initially be set on a new connection.I'm currently using the below as a temporary fix:
It appears the library also doesn't issue a
PBSZ
command which is apparently required by https://tools.ietf.org/html/rfc2228.Other libraries seem to use
PBSZ 0
successfully.Unrelated to #32, as it turns out.
The text was updated successfully, but these errors were encountered: