CNAME doesn't allow leading underscore in domain labels
Closed this issue · 0 comments
peteeckel commented
Versions
NetBox Version: 4.0.3
NetBox DNS Version: 1.0.1
Python Version: 3.11.5
Describe the bug
When adding a CNAME
, leading underscores in domain labels result in the value failing validation.
To Reproduce
Steps to reproduce the behavior:
- Try to a
CNAME
record with the value e.g.selector1-example-com._domainkey._SOMEDOMAIN.onmicrosoft.com.
(yes, Microsoft again)
Expected result
The CNAME
is created with that value.
Actual result
The CNAME
is not created, NetBox DNS complains that it isn't a valid DNS name.
Value validation is meant to be extremely tolerant because e.g. in case of CNAMEs we have no way of knowing what the name server responsible for resolving the value will accept for values. So leading underscores in domain labels should be perfectly fine.