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

Disallow names that start with '.' in IsDomainName() #1376

Merged
merged 2 commits into from May 26, 2022

Conversation

shane-kerr
Copy link
Contributor

We noticed that IsDomainName() was allowing names that start with at .. This is an error, which this PR fixes.

@tmthrgd
Copy link
Collaborator

tmthrgd commented May 25, 2022

// XXX: The logic in this function was copied from packDomainName and
// should be kept in sync with that function.

^See the comment at the start of the function.

@shane-kerr
Copy link
Contributor Author

// XXX: The logic in this function was copied from packDomainName and
// should be kept in sync with that function.

^See the comment at the start of the function.

Ah, okay. I've updated packDomainName(). I didn't see any relevant tests in msg_test.go and I also didn't add any. Hopefully that is okay.

@miekg
Copy link
Owner

miekg commented May 26, 2022

thanks both, comment is acted upon. merging

@miekg miekg merged commit 7413c83 into miekg:master May 26, 2022
aanm pushed a commit to cilium/dns that referenced this pull request Jul 29, 2022
* Disallow names that start with '.' in IsDomainName()

* Also update packDomain()
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.

None yet

4 participants