sysMonDash
sysMonDash copied to clipboard
TCP addresses are not parsed properly
TCP addresses with '-' characters (and other legal non-word characters) are not parsed properly in the regex for getUrl() in SocketTCP.
Additional characters need to be in the match group, escaped '-' for our particular problem but maybe there are more characters not included (underscore etc..)
Hello!
You're right, minus sign should be allowed.
The regex used for getting the URL is '#^https?://([\w.:]+)/?#'
so it will match all hostnames that include either upper and lower case letters, numbers, dots or underscores (https://en.wikipedia.org/wiki/Regular_expression#Character_classes), but there are some restrictions about hostnames https://en.wikipedia.org/wiki/Hostname#Restrictions_on_valid_hostnames
Thanks for the feedback!