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

Uppercase letters in domain names can cause issues #15

Open
MedicMomcilo opened this issue Dec 22, 2017 · 3 comments
Open

Uppercase letters in domain names can cause issues #15

MedicMomcilo opened this issue Dec 22, 2017 · 3 comments

Comments

@MedicMomcilo
Copy link

Even though the domain names are case insensitive, database may contain values which contain uppercase letters.
This is not being handled in PowerDNS Admin interface right now.

Displaying such zone would cause all records to also have zone name in the record (instead of '@').
Stripping fails due to records not being uppercase, while zone is.
If you change and commit those records to PowerDNS it would then append zone name again to the records.

Example zone:

www  CNAME  Active  3600  example.com
@  A  Active  3600  127.0.0.1

When it is in database noted as 'Example.com' instead of 'example.com' it would be displayed like this:

www.example.com  CNAME  Active  3600  example.com
example.com  A  Active  3600  127.0.0.1

After adding record and refreshing domain names would get corrupted:

www.example.com.example.com  CNAME  Active  3600  example.com
example.com.example.com  A  Active  3600  127.0.0.1
new.example.com  A  Active  3600  127.0.0.1

This should be easily fixed by first converting zone name to lowercase on stripping.
Even though it is not expected to have zones in uppercase in the database, I think interface should not corrupt the zone if it appears.

@thomasDOTwtf
Copy link
Owner

Hey, does the issue occour on lower case only domain names too?

@MedicMomcilo
Copy link
Author

Hey Thomas,

The issue is, if database contains domains with uppercases, this will not be handled correctly in PowerDNS Admin.

Most likely fix is to convert everything to lowercase prior to actually parsing and constructing the UI.

Please let me know if this doesn't clarify the problem.

Kind regards,
Momo.

@thomasDOTwtf
Copy link
Owner

Hi, I've tried to reproduce the issue. Steps I've done:

  1. Create new Domain "Test.com"
  2. Manage Domain and add A-record test1 -> 1.1.1.1
  3. Save and Apply Changes
  4. Refresh Domain (F5)

My new a-record is not suffixed by test.com.
Am I doing right reproducing the issue? Which pdns-version do you use?

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

No branches or pull requests

2 participants