NetConfClient null exception when PW incorrect

Open Beginner friendly
#385 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
62/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
csharp
Domain
networking

Research direction

Start at NetConfClient.OnDisconnecting and reproduce a connection attempt with an incorrect password. Trace the password exception through disconnect handling and verify that the reported exception is preserved instead of being replaced by a null object reference. Done means the incorrect-password case returns the expected exception without causing a null-reference failure.

Written by the indexing model from the issue text.

Description

On the stack I saw the Password Exception, but what was returned was a null object reference from here:

    protected override void OnDisconnecting()
    {
        base.OnDisconnecting();

        _netConfSession.Disconnect();    //_netConfSession is null
    }

adding a null check passes me the correct exception

Dominant language
C#
Stars
4.4k
Forks
993
Avg merge
9d 21h
Merged PRs (30d)
1

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from sshnet/SSH.NET

All issues in sshnet/SSH.NET

Similar issues

More C# issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.