mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Use IPEndPoint to avoid potential URL with IP ports
This commit is contained in:
parent
f6ca3c850b
commit
74c18d8195
1 changed files with 2 additions and 2 deletions
|
|
@ -116,8 +116,8 @@ namespace Flow.Launcher.Plugin.Url
|
|||
return true;
|
||||
|
||||
// Valid IP address (excluding 0.0.0.0)
|
||||
if (IPAddress.TryParse(host, out var hostIp))
|
||||
return !hostIp.Equals(IPAddress.Any) && !hostIp.Equals(IPAddress.IPv6Any);
|
||||
if (IPEndPoint.TryParse(host, out endpoint))
|
||||
return !endpoint.Address.Equals(IPAddress.Any) && !endpoint.Address.Equals(IPAddress.IPv6Any);
|
||||
|
||||
// Domain must have valid format with TLD
|
||||
var parts = host.Split('.');
|
||||
|
|
|
|||
Loading…
Reference in a new issue