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

Validate names with address records to be valid hostnames in pdnsutil… #3913

Merged
merged 1 commit into from Jan 25, 2017

Conversation

Projects
None yet
5 participants
@hlindqvist
Contributor

hlindqvist commented May 28, 2016

Validate names with address records to be valid hostnames in pdnsutil check-zone.

Regex hostnameRegex=Regex("^(([A-Za-z0-9]([A-Za-z0-9-]*[A-Za-z0-9])?)\\.)+$");
if (!hostnameRegex.match(rr.qname.toString()))
{
cout<<"[Error] A or AAAA record found at '"<<rr.qname.toString()<<"'. This name is not a valid hostname."<<endl;

This comment has been minimized.

@Habbie

Habbie Jun 3, 2016

Member

This could use an RFC reference. I'm pondering whether we should make it a warning instead of an error, but I'm unsure.

@Habbie

Habbie Jun 3, 2016

Member

This could use an RFC reference. I'm pondering whether we should make it a warning instead of an error, but I'm unsure.

This comment has been minimized.

@hlindqvist

hlindqvist Jun 3, 2016

Contributor

@Habbie is it only https://tools.ietf.org/html/rfc952 + https://tools.ietf.org/html/rfc1123#section-2 that you had in mind (defines what is a valid hostname) or also something to support the inference that a name with address records should be a hostname? Also, is this for a code comment or did you want the RFC references in the output?

@hlindqvist

hlindqvist Jun 3, 2016

Contributor

@Habbie is it only https://tools.ietf.org/html/rfc952 + https://tools.ietf.org/html/rfc1123#section-2 that you had in mind (defines what is a valid hostname) or also something to support the inference that a name with address records should be a hostname? Also, is this for a code comment or did you want the RFC references in the output?

This comment has been minimized.

@Habbie

Habbie Jun 3, 2016

Member

1123 2 is fine. Comment would be good, message would become too long with it I think.

@Habbie

Habbie Jun 3, 2016

Member

1123 2 is fine. Comment would be good, message would become too long with it I think.

@mind04

This comment has been minimized.

Show comment
Hide comment
@mind04

mind04 Jun 3, 2016

Contributor

1123 says "Host domain names MUST be translated to IP addresses". It does not limit the dnsname to ip translation in DNS to valid hostnames.

Contributor

mind04 commented Jun 3, 2016

1123 says "Host domain names MUST be translated to IP addresses". It does not limit the dnsname to ip translation in DNS to valid hostnames.

@Habbie

This comment has been minimized.

Show comment
Hide comment
@Habbie

Habbie Jun 3, 2016

Member

Ack, let's go for Warning then.

Member

Habbie commented Jun 3, 2016

Ack, let's go for Warning then.

@mind04

This comment has been minimized.

Show comment
Hide comment
@mind04

mind04 Jun 3, 2016

Contributor

I prefer [info], output warnings for valid dns is confusing.

Contributor

mind04 commented Jun 3, 2016

I prefer [info], output warnings for valid dns is confusing.

@Habbie

This comment has been minimized.

Show comment
Hide comment
@Habbie

Habbie Jun 3, 2016

Member

Oh, we have Info? Works for me.

Member

Habbie commented Jun 3, 2016

Oh, we have Info? Works for me.

@Habbie Habbie added this to the auth-4.1.0 milestone Jul 7, 2016

@hlindqvist

This comment has been minimized.

Show comment
Hide comment
@hlindqvist

hlindqvist Jul 10, 2016

Contributor

If the stance is that the existence of A records has no implication as to the type of name the owner name is, then I don't think it makes sense to have a message at all.
(That was not my interpretation but if that's what you're going with I think it makes more sense to do nothing.)

However, I'm not sure why 1123 specifically was referenced in the context of what A may actually mean, that seems more like a 1034/1035 deal, @mind04 ?

Contributor

hlindqvist commented Jul 10, 2016

If the stance is that the existence of A records has no implication as to the type of name the owner name is, then I don't think it makes sense to have a message at all.
(That was not my interpretation but if that's what you're going with I think it makes more sense to do nothing.)

However, I'm not sure why 1123 specifically was referenced in the context of what A may actually mean, that seems more like a 1034/1035 deal, @mind04 ?

@pieterlexis pieterlexis merged commit 277bec3 into PowerDNS:master Jan 25, 2017

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@ahupowerdns ahupowerdns modified the milestone: auth-4.1.0 Feb 23, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment