sysMonDash icon indicating copy to clipboard operation
sysMonDash copied to clipboard

TCP addresses are not parsed properly

Open widders opened this issue 7 years ago • 1 comments

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..)

widders avatar Aug 10 '17 08:08 widders

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!

nuxsmin avatar Aug 10 '17 09:08 nuxsmin