LittleDevMars / pyftpdlib

Automatically exported from code.google.com/p/pyftpdlib
Other
0 stars 0 forks source link

windows compatibility issue with TLS #261

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

run the tls_ftpd.py demo

What is the expected output?
in filezilla 3.7.0.2
Command:    PASV
Response:   227 Entering passive mode (127,0,0,1,208,219).
Command:    MLSD
Response:   150 File status okay. About to open data connection.
Response:   226 Transfer complete.
Status: Directory listing successful

What do you see instead?

in filezilla 3.7.0.2
Command:    PASV
Response:   227 Entering passive mode (127,0,0,1,207,165).
Command:    MLSD
Response:   150 File status okay. About to open data connection.
Error:  GnuTLS error -110: The TLS connection was non-properly terminated.
Status: Server did not properly shut down TLS connection
Error:  Transfer connection interrupted: ECONNABORTED - Connection aborted
Response:   226 Transfer complete.
Error:  Failed to retrieve directory listing

What version of pyftpdlib are you using? On what operating system? Which
Python version?
1.2.0 on python 3.3.2 windows 7 x64

Please provide any additional information below.

The problem is under "def _do_ssl_shutdown(self)" at the line:
os.write(self.socket.fileno(), b(''))

I commented the line out and all worked.

Otherwise I get a bad file descriptor error

According to python socket documentation:
socket.fileno() "Under Windows the small integer returned by this method cannot 
be used where a file descriptor can be used (such as os.fdopen()). Unix does 
not have this limitation."

I'm assuming TLS was not tested under Windows.

Original issue reported on code.google.com by brianto...@gmail.com on 30 May 2013 at 7:30

GoogleCodeExporter commented 9 years ago
I have the same problem.
How can I solve it?

Original comment by eltej...@gmail.com on 28 Dec 2013 at 10:56

GoogleCodeExporter commented 9 years ago
Please try r1243.

Original comment by g.rodola on 30 Dec 2013 at 11:46

GoogleCodeExporter commented 9 years ago
Was this fixed?

Original comment by g.rodola on 11 Apr 2014 at 9:21