-
Notifications
You must be signed in to change notification settings - Fork 22
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
remove domains final dots #253
Conversation
lib/Zonemaster/CLI.pm
Outdated
@@ -601,6 +603,8 @@ sub add_fake_delegation { | |||
exit( 1 ); | |||
} | |||
|
|||
$name =~ s/\.$// unless $name eq '.';; |
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.
typo: two semi-colons
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.
To resolve zonemaster/zonemaster-engine#1055 the code must remove multiple trailing dots. Cf zonemaster/zonemaster-backend#983 (comment)
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.
typo: two semi-colons
fixed
lib/Zonemaster/CLI.pm
Outdated
@@ -601,6 +603,8 @@ sub add_fake_delegation { | |||
exit( 1 ); | |||
} | |||
|
|||
$name =~ s/\.$// unless $name eq '.';; |
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.
To resolve zonemaster/zonemaster-engine#1055 the code must remove multiple trailing dots. Cf zonemaster/zonemaster-backend#983 (comment)
I took the same approach as zonemaster/zonemaster-backend#983 and return an error if consecutive dots are found in names. |
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 suggest, in general, to handle the update of the PO files in separate PRs. New PO files can easily be generated with the tools in the share directory.
lib/Zonemaster/CLI.pm
Outdated
exit( 1 ); | ||
} | ||
|
||
if ( $name =~ m/\.\./i ) { | ||
say STDERR __x( "The name of the nameserver '{ns}' contains consecutive dots.", ns => $name ); |
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.
In a msgid in Zonemaster-Engine, an argument for this type must be "nsname". It would be good to use the same definitions here because it makes it easier for the translator. See https://github.com/zonemaster/zonemaster-engine/blob/develop/docs/logentry_args.md
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 have been fixed
@matsduf please re-review |
1 similar comment
@matsduf please re-review |
Missing Spanish locale in Installation document
Purpose
Do not crash when a domain is specified with a final dot.
Context
zonemaster/zonemaster-engine#1055
Changes
How to test this PR
../zonemaster-cli/script/zonemaster-cli --ns ns2.nic.fr. zonemaster.net. --show-testcase
should run the test without crashing../zonemaster-cli/script/zonemaster-cli --ns ns2.nic.fr.. zonemaster.net. --show-testcase
should show an error../zonemaster-cli/script/zonemaster-cli --ns ns2.nic.fr. zonemaster.net.. --show-testcase
should show an error