mirror of
https://github.com/9001/copyparty.git
synced 2026-04-12 23:32:32 -06:00
Merge a60618d7d5 into 0b16e875da
This commit is contained in:
commit
d856079549
|
|
@ -596,6 +596,16 @@ try:
|
||||||
class SftpHandler(FtpHandler, TLS_FTPHandler):
|
class SftpHandler(FtpHandler, TLS_FTPHandler):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
class FtpsImplicitHandler(FtpHandler, TLS_FTPHandler):
|
||||||
|
def handle(self):
|
||||||
|
self.secure_connection(self.ssl_context)
|
||||||
|
|
||||||
|
def handle_ssl_established(self):
|
||||||
|
FtpHandler.handle(self)
|
||||||
|
|
||||||
|
def ftp_AUTH(self, arg):
|
||||||
|
self.respond("550 not supposed to be used with implicit SSL.")
|
||||||
|
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
@ -610,7 +620,7 @@ class Ftpd(object):
|
||||||
hs.append([FtpHandler, self.args.ftp])
|
hs.append([FtpHandler, self.args.ftp])
|
||||||
if self.args.ftps:
|
if self.args.ftps:
|
||||||
try:
|
try:
|
||||||
h1 = SftpHandler
|
h1 = FtpsImplicitHandler
|
||||||
except:
|
except:
|
||||||
t = "\nftps requires pyopenssl;\nplease run the following:\n\n {} -m pip install --user pyopenssl\n"
|
t = "\nftps requires pyopenssl;\nplease run the following:\n\n {} -m pip install --user pyopenssl\n"
|
||||||
print(t.format(pybin))
|
print(t.format(pybin))
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue