Skip to content

Exception when reading sftp extensions #726

Open

Description

@alb3ric

Hello,

I encounter the following exception reading the SFTP extensions => An item with the same key has already been added

The server is returning a duplicate extension : posix-rename@openssh.com which make failed the dictionary Add in ReadExtensionPair().

I know the server shouldn't return twice the extension but I think it would be good to not fail and maybe to keep the last key/value pair received.

I can submit a fix. What do you think ?

Regards

---------- EXCEPTION -------------
System.ArgumentException: An item with the same key has already been added.
at Renci.SshNet.SubsystemSession.WaitOnHandle(WaitHandle waitHandle, Int32 millisecondsTimeout)
at Renci.SshNet.Sftp.SftpSession.OnChannelOpen()
at Renci.SshNet.SubsystemSession.Connect()
at Renci.SshNet.SftpClient.OnConnected()
at Renci.SshNet.BaseClient.Connect()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions