Skip to content

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.

@shane-kerr shane-kerr requested review from miekg and tmthrgd as code owners May 24, 2022 18:57
@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.

4 participants