Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Fix pattern for matching SRV service names #26332
The pattern that's checking for a valid Service Name is too restrictive.
Currently, the following SRV strings can be passed:
The current pattern follows the spec defined at: https://tools.ietf.org/html/rfc1034
Basic rules are:
In combination with #25987, one could build a
@johanandren, I updated the PR with a new regex. This is good for review and discussions.
The pattern still complies with domain name format (maybe we should rename it back to
You are right, and the definition of it is here:
My initial explanation in the description is wrong. We should consider it a domain name, but the pattern we were using were not correct.