Quantcast
Channel: sshnet Issue Tracker Rss Feed
Viewing all articles
Browse latest Browse all 1026

Created Unassigned: Don't throw ArgumentException on empty username [2672]

$
0
0
Currently the constructor for AuthenticationMethod throws an exception when the username is empty (String.Empty). This prevents from creating a connection with blank username (eg. Cisco routers).

The fix should be simple, just change
```
protected AuthenticationMethod(string username)
{
if (username.IsNullOrWhiteSpace())
throw new ArgumentException("username");

Username = username;
}
```
to:
```
protected AuthenticationMethod(string username)
{
if (username == null)
throw new ArgumentException("username");

Username = username;
}
```

Viewing all articles
Browse latest Browse all 1026

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>