bind_check_hostname blocks dkim and srv records
braddeicide opened this issue · 2 comments
dkim txt records use the format selector._domainkey.your_domain.com which is rejected as this modules uses stdlib is_domain_name which is rightly rejecting it as it's not a valid domain name character, it is valid for a bind record however.
/lib/puppet/parser/functions/bind_check_hostname.rb allows '@' to bypass for this reason, so I for the same reason I added
# Allow dkim keys by stripping domain invalid _ charactor
domain = record.sub(/._domainkey/, '')
There's also srv records which are not as easy to identify with the format
_service._proto.name
eg
_ts3._udp.yourdomain.tld.
We could just allow _ in general with
# Allow srv and dkim by stripping invalid _ character
domain = record.sub(/_/, '')
Or, change bind_check_hostname to get two arguments which includes the record_type. and only allow underscores for TXT and SRV?
Hello,
Allowing the "_" may lead to some bad problems, this char being refused in standard records. I guess I'll have to check the record type in order to allow more stuff in TXT and SRV. This would be the best way I think.
Thank you for this report - I'll have a look.
Cheers,
C.
Any news on this?