Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception when reading sftp extensions #726

Open
alb3ric opened this issue Sep 10, 2020 · 0 comments · May be fixed by #727
Open

Exception when reading sftp extensions #726

alb3ric opened this issue Sep 10, 2020 · 0 comments · May be fixed by #727

Comments

@alb3ric
Copy link

alb3ric commented Sep 10, 2020

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()

alb3ric added a commit to alb3ric/SSH.NET that referenced this issue Sep 10, 2020
@alb3ric alb3ric linked a pull request Sep 10, 2020 that will close this issue
alb3ric added a commit to alb3ric/SSH.NET that referenced this issue Sep 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant