Use Zonemaster::Engine::Normalization module for input name normalization#357
Use Zonemaster::Engine::Normalization module for input name normalization#357tgreenx merged 7 commits intozonemaster:developfrom
Conversation
…name normalization - Use Zonemaster::Engine::Normalization::normalize_name() in function add_fake_delegation() - Add conditional check to argument '--ns' in case of several slash characters
|
Seems like at first I forgot about the normalization of name server names. It is now done (commit 4ab0aaf). I also pushed another commit (0c8093e) that removes the now unused By the way, in both the specification and the implementation (message ids) of Also, in this PR , for normalization of name server names, I added the message |
This is no longer needed following the switch to Zonemaster::Engine::Normalization.
0c8093e to
2974ebc
Compare
mattias-p
left a comment
There was a problem hiding this comment.
I like this change but I have a couple of nits.
The problem with "İabcİ" is that it cannot be downcased in an unambiguous way. The specification says "AMBIGUOUS_DOWNCASING" (https://github.com/zonemaster/zonemaster/blob/master/docs/public/specifications/tests/RequirementsAndNormalizationOfDomainNames.md). |
|
I tested the PR with |
As suggested by @blacksponge, with proper decoding this should now work as expected. See commit ce9b025. |
Update IP address validation methodology - It is now primarly based on regex checks, but also leverages Net::IP::XS::Error (when applicable) for more detailed error messages Add Readonly and Net::IP::XS as direct dependencies
hannaeko
left a comment
There was a problem hiding this comment.
Looks fine to me! I tested some of the test commands and it works as expected.
matsduf
left a comment
There was a problem hiding this comment.
Nice to have it in place! This gives consistent and documented behavior.
v2023.2 release testingI've tested this for v2023.2 and I could not find any deviations between the described behavior and the actual behavior. However, upon reflection I think the behavior could be improved in a couple of ways. I created #364 for this. |
Purpose
This PR introduces the usage of the Zonemaster::Engine::Normalization module for input DNS name normalization.
It also adds input validation to the
--nsargument..Context
The current specification can found here, and will replace the Basic00 Test Case.
Changes
Zonemaster::Engine::Normalization::normalize_name()--nsargument validation:/) charactersNet::IP::XS::Error()for detailed error messagesZonemaster::CLI::to_idn()ReadonlyandNet::IP::XSas direct dependenciesHow to test this PR
Testing should proceed as before, although more errors are now supported and several can be reported simultaneously:
Examples of (in)valid domain names can be found in the t/normalization.t unit test file in Engine, e.g: