Modify

Ticket #1676 (closed defect: fixed)

Opened 3 years ago

Last modified 3 years ago

deal with non-ascii chars on hostname fields

Reported by: jsalamero@… Owned by: jacalvo@…
Milestone: 2.0.X Component: base
Severity: normal Keywords:
Cc:

Description

hostname fields shouldn't permit non-ascii fields or deal with them somehow.

Attachments

Change History

comment:1 Changed 3 years ago by jacalvo@…

  • Owner changed from javier.amor.garcia@… to jacalvo@…
  • Milestone changed from nice to have someday to 2.0.X

comment:2 Changed 3 years ago by jacalvo@…

  • Status changed from new to assigned

Currently this check is done with:

sub _checkDomainName {
        my $d = shift;
        ($d =~ /^\w/) or return undef;
        ($d =~ /\w$/) or return undef;
        ($d =~ /\.-/) and return undef;
        ($d =~ /-\./) and return undef;
        ($d =~ /\.\./) and return undef;
        ($d =~ /_/) and return undef;
        ($d =~ /^[-\.\w]+$/) or return undef;
        return 1;
}

Maybe we should replace that with libdata-validate-domain-perl:

use Data::Validate::Domain qw(is_domain);

is_domain($foo)

comment:3 Changed 3 years ago by jacalvo@…

  • Status changed from assigned to closed
  • Resolution set to fixed

(In [19472]) NN: Validation of domain names using Data::Validate::Domain (closes #1676)

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.