-
Notifications
You must be signed in to change notification settings - Fork 24
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
Fix handling of consecutive and final dots #983
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Addresses #854 as well |
lib/Zonemaster/Backend/DB.pm
Outdated
@@ -557,6 +558,7 @@ sub _project_params { | |||
delete $$nameserver{ip}; | |||
} | |||
$$nameserver{ns} = lc $$nameserver{ns}; | |||
$$nameserver{ns} =~ s/\.$//; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$$nameserver{ns} =~ s/\.+$//;
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I disagree for the same reasons.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See above.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make this PR resolve zonemaster/zonemaster-engine#1055 even if it is a temporary fix.
I rebased on top of develop and added the check for consecutive dots in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks fine, but the MO files should not be included.
Oops, those should not have been included. Fixed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is fine. I approve.
Purpose
Context
zonemaster/zonemaster-engine#1055
#854
Changes
How to test this PR
./script/zmb start_domain_test --domain zonemaster.net --nameserver ns2.nic.fr.:192.93.0.4
should not crash./script/zmb start_domain_test --domain zonemaster.net. --nameserver ns2.nic.fr:192.93.0.4
should return the same hash id./script/zmb start_domain_test --domain zonemaster..net. --nameserver ns2.nic.fr...:192.93.0.4
should return an validation error