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

Fix SSH hostname parsing to be case sensitive and refactor remoting methods to static class #20968

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
Open
Prev Previous commit
Next Next commit
Formatting name type check
  • Loading branch information
ArmaanMcleod committed Jan 3, 2024
commit b0f8a69b716e5dcb02e74936a1d057ea24c6f3eb
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,9 @@ internal static void ValidateComputerName(PSRemotingBaseCmdlet cmdlet, string[]
foreach (string computerName in computerNames)
{
UriHostNameType nametype = Uri.CheckHostName(computerName);
if (!(nametype == UriHostNameType.Dns || nametype == UriHostNameType.IPv4 ||

if (!(nametype == UriHostNameType.Dns ||
nametype == UriHostNameType.IPv4 ||
nametype == UriHostNameType.IPv6))
{
ReportInvalidComputerName(cmdlet, computerNames);
Expand Down