Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/is name underscores #66

Merged
merged 3 commits into from
Mar 25, 2024

Conversation

zeroSteiner
Copy link
Contributor

Per RFC 2181, DNS names can contain underscores. Since the .is_name? class method is intended to inspect the value and tell if it's value for resolution, it should allow underscores in the labels.

Included a test to show that the legitimate case of _ldap._tcp.msflab.local now works as intended.

@@ -342,6 +342,13 @@
end
end

context 'with a name containing underscores' do
Copy link
Contributor

@adfoster-r7 adfoster-r7 Mar 25, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not a blocker; would it make sense to rename is_name? is is_dns_name? or something similar? I intentionally didn't call it on the initial PR as I thought the distinction wasn't super important, but now I wish I had as hostname vs DNS name have very different rules apparently 😄

@adfoster-r7 adfoster-r7 merged commit e224ff5 into rapid7:master Mar 25, 2024
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants