FubarDevelopment / FtpServer

Portable FTP server written in .NET
http://fubardevelopment.github.io/FtpServer/
MIT License
482 stars 163 forks source link

Cleanly reject an AUTH TLS command if ServerCertificate is null #51

Closed avonheimburg closed 5 years ago

avonheimburg commented 5 years ago

The default behaviour of FTP clients such as Filezilla and WinSCP, unless configured otherwise, is to connect on Port 21 and then immediately attempt an AUTH TLS before doing anything else. If TLS is not configured, this used to lead to an Exception. While TLS should always be configured in production, this is annoying for quick local tests.

This patch makes FtpServer cleanly reject the AUTH TLS request if no ServerCertificate is configured. Clients will warn the user and fall back to unencrypted FTP.