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

remove domains final dots #253

Merged
merged 5 commits into from
May 12, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 15 additions & 2 deletions lib/Zonemaster/CLI.pm
Original file line number Diff line number Diff line change
Expand Up @@ -472,6 +472,12 @@ sub run {
die __( "Must give the name of a domain to test.\n" );
}

matsduf marked this conversation as resolved.
Show resolved Hide resolved
if ( $domain =~ m/\.\./i ) {
die __( "The domain name contains consecutive dots.\n" );
}

$domain =~ s/\.$// unless $domain eq '.';

if ( $translator ) {
if ( $self->time ) {
print __( 'Seconds ' );
Expand Down Expand Up @@ -597,10 +603,17 @@ sub add_fake_delegation {
my ( $name, $ip ) = split( '/', $pair, 2 );

if ( not $name ) {
say STDERR "--ns must have be a name or a name/ip pair.";
say STDERR __( "--ns must be a name or a name/ip pair." );
exit( 1 );
}

matsduf marked this conversation as resolved.
Show resolved Hide resolved
if ( $name =~ m/\.\./i ) {
say STDERR __x( "The name of the nameserver '{nsname}' contains consecutive dots.", nsname => $name );
exit ( 1 );
}

$name =~ s/\.$// unless $name eq '.';

if ($ip) {
push @{ $data{ $self->to_idn( $name ) } }, $ip;
}
Expand Down Expand Up @@ -704,7 +717,7 @@ sub print_test_list {

sub do_dump_profile {
my $json = JSON::XS->new->canonical->pretty;

print $json->encode( Zonemaster::Engine::Profile->effective->{ q{profile} } );

exit;
Expand Down
12 changes: 11 additions & 1 deletion share/fr.po
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ msgid ""
msgstr ""
"Project-Id-Version: 0.0.5\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-04-28 16:09+0200\n"
"POT-Creation-Date: 2022-05-03 10:32+0200\n"
"PO-Revision-Date: 2014-08-28\n"
"Last-Translator: [email protected]\n"
"Language-Team: Zonemaster Team\n"
Expand Down Expand Up @@ -203,6 +203,9 @@ msgstr ""
msgid "Must give the name of a domain to test.\n"
msgstr "Il est nécessaire d'indiquer un nom de domaine pour lancer le test.\n"

msgid "The domain name contains consecutive dots.\n"
msgstr "Le nom de domaine contient des points consécutifs.\n"

msgid "Seconds "
msgstr "Durée "

Expand Down Expand Up @@ -249,6 +252,13 @@ msgstr ""
msgid "%8s\t%5d entries.\n"
msgstr "%8s\t%5d entrées.\n"

msgid "--ns must be a name or a name/ip pair."
msgstr "--ns doit être un nom ou un couple nom/ip."

#, perl-brace-format
msgid "The name of the nameserver '{nsname}' contains consecutive dots."
msgstr "Le nom du serveur de noms '{nsname}' contient des points consécutifs."

msgid ""
"Warning: Zonemaster::LDNS not compiled with IDN support, cannot handle non-"
"ASCII names correctly."
Expand Down