Total Commander Forum Index Total Commander
Forum - Public Discussion and Support
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

ftps upload file

 
Post new topic   Reply to topic    Total Commander Forum Index -> Bug reports from previous betas (unresolved) Printable version
View previous topic :: View next topic  
Author Message
bagrous
New Member
New Member


Joined: 23 Jun 2010
Posts: 1

PostPosted: Wed Jun 23, 2010 11:49 pm    Post subject: ftps upload file Reply with quote

i have one predefined ftps server. if i tried to upload a file to ftps server, it uploads to 100 percent and the dialog doesn't disappear and it couldn't continue with other files (stucks on first file).
everything works fine if i downgrade to 7.50a
other predefined classic ftp servers work great in 7.55
Back to top
View user's profile Send private message
ghisler(Author)
Site Admin
Site Admin


Joined: 04 Feb 2003
Posts: 28477
Location: Switzerland

PostPosted: Thu Jun 24, 2010 3:38 am    Post subject: Reply with quote

Can you send me a log of both the working and hanging transfer to beta at ghisler dot com, please? I don't have any problems uploading to any of the tested ftps servers, so I need your help to find the problem. TC 7.55 should actually handle hanging connections much better than TC 7.50a...
_________________
Author of Total Commander
http://www.ghisler.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Sob
Power Member
Power Member


Joined: 19 Jan 2005
Posts: 748

PostPosted: Thu Jun 24, 2010 6:08 am    Post subject: Reply with quote

I also found one such (non-public) server. So I asked about the used software and it's this exact version of Serv-U:

http://web.hisoftware.cz/sob/tmp/ServUSetup_9-4-0-0.exe (md5 fada205b3e922f9530781fe914bc5f43)

Just install it next-next-finish style (i.e. don't change anything), create domain and user and that's all. Default ssl certificate is included and enabled. Connect, upload some file and transfer should hang at 100%. Tested on clean XP SP3.
Back to top
View user's profile Send private message Send e-mail
ghisler(Author)
Site Admin
Site Admin


Joined: 04 Feb 2003
Posts: 28477
Location: Switzerland

PostPosted: Thu Jun 24, 2010 10:26 am    Post subject: Reply with quote

I can confirm the bug in Serv-U 9-4-0-0. The error is in the function SSL_shutdown: According to the OpenSSL documentation, programs need to check the reply of SSL_shutdown, and if it's 0, call SSL_shutdown again:
http://www.openssl.org/docs/ssl/SSL_shutdown.html

Quote:
It is therefore recommended, to check the return value of SSL_shutdown() and call SSL_shutdown() again, if the bidirectional shutdown is not yet complete (return value of the first call is 0). As the shutdown is not specially handled in the SSLv2 protocol, SSL_shutdown() will succeed on the first call.


I have done this in TC 7.55, but apparently Serv-U 9-4-0-0 is not sending the shutdown reply, so TC waits forever for the closing of the connection.

Therefore I will have to revert to the behaviour of TC 7.50a which just sends shutdown and then closes the connection.
_________________
Author of Total Commander
http://www.ghisler.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Sob
Power Member
Power Member


Joined: 19 Jan 2005
Posts: 748

PostPosted: Thu Jun 24, 2010 11:09 am    Post subject: Reply with quote

The same page says that for TLS it's ok to only call SSL_shutdown() once, if you're going to close the connection. And ftp data connection can't be reused, so why even bother with second call. ;)
Back to top
View user's profile Send private message Send e-mail
ghisler(Author)
Site Admin
Site Admin


Joined: 04 Feb 2003
Posts: 28477
Location: Switzerland

PostPosted: Thu Jun 24, 2010 2:58 pm    Post subject: Reply with quote

I wanted to be sure that the connection was properly closed, so no data was lost in the upload. But apparently this isn't possible with some servers.
_________________
Author of Total Commander
http://www.ghisler.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Sob
Power Member
Power Member


Joined: 19 Jan 2005
Posts: 748

PostPosted: Thu Jun 24, 2010 5:12 pm    Post subject: Reply with quote

It does feel a little better and safer when the other side correctly confirms ssl shutdown, no doubt about that. And it's bug in Serv-U and only in this older version. So maybe keeping the current behavior and just extending SpecialFlags in wcx_ftp.ini to enable the old one would be enough?
Back to top
View user's profile Send private message Send e-mail
ghisler(Author)
Site Admin
Site Admin


Joined: 04 Feb 2003
Posts: 28477
Location: Switzerland

PostPosted: Fri Jun 25, 2010 9:42 am    Post subject: Reply with quote

For the moment I will revert to the behaviour of TC 7.50 (send shutdown and not wait for reply).
_________________
Author of Total Commander
http://www.ghisler.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Total Commander Forum Index -> Bug reports from previous betas (unresolved) All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Impressum: This site is maintained by Ghisler Software GmbH

Using phpBB © 2001-2005 phpBB Group