Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#10700 closed Bug report (rejected)

Python Client failing to upload file to filezilla 0.9.53

Reported by: yaateq Owned by:
Priority: normal Component: FileZilla Server
Keywords: Cc:
Component version: 0.9.53 Operating system type: Windows
Operating system version: Win 2008 R2

Description

A python 2.7 client was able to connect and upload files to my filezilla server 0.9.44 using the following:

sftp = FTP_TLS(SHOUTBOMB_HOST, SHOUTBOMB_USER, SHOUTBOMB_PASSWORD)
sftp.login(SHOUTBOMB_USER, SHOUTBOMB_PASSWORD)
sftp.prot_p()

put_file(sftp, holds_file, "/Holds/")
for f in overdue_files:

put_file(sftp, f, "/Overdue/")

put_file(sftp, renewals_file, "/Renew/")

sftp.quit()

However after updating the server to 0.9.53 we are able to establish a connection however, the file upload is failing. This is the updated python:

sftp = FTP_TLS()
sftp.ssl_version = ssl.PROTOCOL_TLSv1
sftp.connect(SHOUTBOMB_HOST)
sftp.login(SHOUTBOMB_USER, SHOUTBOMB_PASSWORD)
sftp.prot_p()

put_file(sftp, holds_file, "/Holds/")
for f in overdue_files:

put_file(sftp, f, "/Overdue/")

put_file(sftp, renewals_file, "/Renew/")

sftp.quit()

Python error we see

Traceback (most recent call last):

File "<stdin>", line 1, in <module>
File "C:\Program Files (x86)\Python27\lib\ftplib.py", line 759, in storlines

conn = self.transfercmd(cmd)

File "C:\Program Files (x86)\Python27\lib\ftplib.py", line 376, in transfercmd

return self.ntransfercmd(cmd, rest)[0]

File "C:\Program Files (x86)\Python27\lib\ftplib.py", line 696, in ntransfercmd

ssl_version=self.ssl_version)

File "C:\Program Files (x86)\Python27\lib\ssl.py", line 891, in wrap_socket

ciphers=ciphers)

File "C:\Program Files (x86)\Python27\lib\ssl.py", line 566, in init

self.do_handshake()

File "C:\Program Files (x86)\Python27\lib\ssl.py", line 788, in do_handshake

self._sslobj.do_handshake()

ssl.SSLEOFError: EOF occurred in violation of protocol (_ssl.c:581)

end of python error

Filezilla logs

(000186)11/12/2015 20:38:48 PM - (not logged in) (xxx.xxx.xxx.xxx)> Connected on port 990, sending welcome message...
(000186)11/12/2015 20:38:48 PM - (not logged in) (xxx.xxx.xxx.xxx)> SSL connection established
(000186)11/12/2015 20:39:32 PM - (not logged in) (xxx.xxx.xxx.xxx)> USER xxxxxg
(000186)11/12/2015 20:39:32 PM - (not logged in) (xxx.xxx.xxx.xxx)> 331 Password required for xxxxxg
(000186)11/12/2015 20:39:32 PM - (not logged in) (xxx.xxx.xxx.xxx)> PASS
(000186)11/12/2015 20:39:32 PM - xxxxxg (xxx.xxx.xxx.xxx)> 230 Logged on
(000186)11/12/2015 20:39:44 PM - xxxxxg (xxx.xxx.xxx.xxx)> PBSZ 0
(000186)11/12/2015 20:39:44 PM - xxxxxg (xxx.xxx.xxx.xxx)> 200 PBSZ=0
(000186)11/12/2015 20:39:44 PM - xxxxxg (xxx.xxx.xxx.xxx)> PROT P
(000186)11/12/2015 20:39:44 PM - xxxxxg (xxx.xxx.xxx.xxx)> 200 Protection level set to P
(000186)11/12/2015 20:40:44 PM - xxxxxg (xxx.xxx.xxx.xxx)> TYPE A
(000186)11/12/2015 20:40:44 PM - xxxxxg (xxx.xxx.xxx.xxx)> 200 Type set to A
(000186)11/12/2015 20:40:44 PM - xxxxxg (xxx.xxx.xxx.xxx)> PASV
(000186)11/12/2015 20:40:44 PM - xxxxxg (xxx.xxx.xxx.xxx)> 227 Entering Passive Mode (xx,xx,xx,xx,19,149)
(000186)11/12/2015 20:40:44 PM - xxxxxg (xxx.xxx.xxx.xxx)> STOR chrome_installer.log
(000186)11/12/2015 20:40:44 PM - xxxxxg (xxx.xxx.xxx.xxx)> 150 Opening data channel for file upload to server of "/chrome_installer.log"
(000186)11/12/2015 20:40:45 PM - xxxxxg (xxx.xxx.xxx.xxx)> 450 TLS session of data connection has not resumed or the session does not match the control connection
(000186)11/12/2015 20:44:45 PM - xxxxxg (xxx.xxx.xxx.xxx)> 421 Connection timed out.
(000186)11/12/2015 20:44:45 PM - xxxxxg (xxx.xxx.xxx.xxx)> disconnected.

end of Filezilla logs

Change History (3)

comment:1 Changed 4 years ago by Tim Kosse

Preamble: Note that FTP over TLS is abbreviated with FTPS. SFTP stands for SSH File Transfer Protocol. Two completely different protocols that have absolutely nothing in common except a similar name and purpose. As you are using the former, please correct your variable name.



450 TLS session of data connection has not resumed or the session does not match the control connection

That's the problem. Your client does not use TLS session resumption on the data connection. FileZilla Server requires resumption of the TLS session to protect against FTP data connection stealing.

You need to bring up this issue with the Python team. A quick google search found this ticket: https://bugs.python.org/issue19500

comment:2 Changed 4 years ago by Tim Kosse

Resolution: rejected
Status: newclosed

comment:3 Changed 4 years ago by yaateq

Appreciate your time and efforts.

Note: See TracTickets for help on using tickets.