hyperglass icon indicating copy to clipboard operation
hyperglass copied to clipboard

FQDN Validation: FQDNs with fourth-level domain aren't considered valid

Open handymenny opened this issue 3 years ago • 0 comments

Bug Description

If I sumbit an FQDN with a fourth-level domain, hyperglass responds with this error: 'XXX is not a valid Traceroute target'.

An example of valid domains that trigger this error are:

  • ec2-18-194-0-252.eu-central-1.compute.amazonaws.com
  • r3.sn-fpoq-o52l.googlevideo.com

Expected behavior

hyperglass should consider these domains valid and proceed with DNS resolution

Possible Solution

Replace fqdnPattern regex with: /^(?!:\/\/)([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-][a-zA-Z0-9-]+\.[a-zA-Z-]{2,6}?$/im

handymenny avatar Dec 21 '21 16:12 handymenny