TScSFTPServer: suspend afer send quit command by sftp-client

Discussion of open issues, suggestions and bugs regarding network security and data protection solution - SecureBridge
Post Reply
mgr
Posts: 2
Joined: Fri 06 Dec 2013 07:56

TScSFTPServer: suspend afer send quit command by sftp-client

Post by mgr » Fri 06 Dec 2013 10:21

Hello,

I use your SecureBridge-sourcecode-edition 6.1. In order to test your SFTP-Server-component I created a small project. On main form there are only 3 components:
TScSFTPServer, TScSSHServer, TScFileStorage. All settings are set by IDE. In FormCreate I only activate TScSSHServer: ScSSHServer1.Active := True;

I tested with linux and putty sftp-client. Login works but after I execute quit-command both sftp-clients suspend (wait for something). In code ScSSH2Channel.ProcessPacket line 511 I see that the client sends a eof (SSH_MSG_CHANNEL_EOF). After that nothing happens. I inserted after line "Close; Dispose;" then it works bit is that OK? I guess that the component waits for SSH_MSG_CHANNEL_CLOSE to close the channel but this message doesn't occur. Or could it be that the clients waits for a response after SSH_MSG_CHANNEL_EOF and then the sftp-clients send SSH_MSG_CHANNEL_CLOSE?

Dimon
Devart Team
Posts: 2910
Joined: Mon 05 Mar 2007 16:32

Re: TScSFTPServer: suspend afer send quit command by sftp-client

Post by Dimon » Wed 11 Dec 2013 11:41

Thank you for the information. We have reproduced this problem and fixed it. This fix will be included in the next SecureBridge build.

To solve the problem, replace the call of the SetEOF method with a Close method (without Dispose calling), like this:

Code: Select all

  SSH_MSG_CHANNEL_EOF:
    Close;

Post Reply