Changeset 657
- Timestamp:
- 09/09/14 16:32:50 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/DNSDB.pm
r656 r657 533 533 # or the intended parent domain for live records. 534 534 my $pname = ($args{defrec} eq 'y' ? 'DOMAIN' : $self->domainName($args{id})); 535 ${$args{host}} =~ s/\.*$/\.$pname/ if (${$args{host}} ne '@' && ${$args{host}} !~ /$pname$/ );535 ${$args{host}} =~ s/\.*$/\.$pname/ if (${$args{host}} ne '@' && ${$args{host}} !~ /$pname$/i); 536 536 537 537 # Check if it's a proper formal .arpa name for an IP, and renormalize it to the IP … … 597 597 # Forcibly append the domain name if the hostname being added does not end with the current domain name 598 598 my $pname = $self->domainName($args{id}); 599 ${$args{host}} =~ s/\.*$/\.$pname/ if (${$args{host}} ne '@' && ${$args{host}} !~ /$pname$/ );599 ${$args{host}} =~ s/\.*$/\.$pname/ if (${$args{host}} ne '@' && ${$args{host}} !~ /$pname$/i); 600 600 } 601 601 } else { … … 656 656 # Forcibly append the domain name if the hostname being added does not end with the current domain name 657 657 my $pname = ($args{defrec} eq 'y' ? 'DOMAIN' : $self->domainName($args{id})); 658 ${$args{host}} =~ s/\.*$/\.$pname/ if ${$args{host}} !~ /$pname$/ ;658 ${$args{host}} =~ s/\.*$/\.$pname/ if ${$args{host}} !~ /$pname$/i; 659 659 660 660 # CNAMEs can not be used for parent nodes; just leaf nodes with no other record types … … 743 743 # Fetch the domain and append if the passed hostname isn't within it. 744 744 my $pname = ($args{defrec} eq 'y' ? 'DOMAIN' : $self->domainName($args{id})); 745 ${$args{host}} =~ s/\.*$/\.$pname/ if (${$args{host}} ne '@' && ${$args{host}} !~ /$pname$/ );745 ${$args{host}} =~ s/\.*$/\.$pname/ if (${$args{host}} ne '@' && ${$args{host}} !~ /$pname$/i); 746 746 # Validate hostname and target for form 747 747 return ('FAIL', $errstr) if ! _check_hostname_form(${$args{host}}, ${$args{rectype}}, $args{defrec}, $args{revrec}); … … 818 818 # or the intended parent domain for live records. 819 819 my $pname = ($args{defrec} eq 'y' ? 'DOMAIN' : $self->domainName($args{id})); 820 ${$args{host}} =~ s/\.*$/\.$pname/ if (${$args{host}} ne '@' && ${$args{host}} !~ /$pname$/ );820 ${$args{host}} =~ s/\.*$/\.$pname/ if (${$args{host}} ne '@' && ${$args{host}} !~ /$pname$/i); 821 821 return ('FAIL', $errstr) if ! _check_hostname_form(${$args{host}}, ${$args{rectype}}, $args{defrec}, $args{revrec}); 822 822 } else { … … 857 857 # or the intended parent domain for live records. 858 858 my $pname = ($args{defrec} eq 'y' ? 'DOMAIN' : $self->domainName($args{id})); 859 ${$args{host}} =~ s/\.*$/\.$pname/ if (${$args{host}} ne '@' && ${$args{host}} !~ /$pname$/ );859 ${$args{host}} =~ s/\.*$/\.$pname/ if (${$args{host}} ne '@' && ${$args{host}} !~ /$pname$/i); 860 860 return ('FAIL', $errstr) if ! _check_hostname_form(${$args{host}}, ${$args{rectype}}, $args{defrec}, $args{revrec}); 861 861 } else { … … 926 926 # or the intended parent domain for live records. 927 927 my $pname = ($args{defrec} eq 'y' ? 'DOMAIN' : $self->domainName($args{id})); 928 ${$args{host}} =~ s/\.*$/\.$pname/ if (${$args{host}} ne '@' && ${$args{host}} !~ /$pname$/ );928 ${$args{host}} =~ s/\.*$/\.$pname/ if (${$args{host}} ne '@' && ${$args{host}} !~ /$pname$/i); 929 929 930 930 # Check if it's a proper formal .arpa name for an IP, and renormalize it to the IP … … 976 976 # or the intended parent domain for live records. 977 977 my $pname = ($args{defrec} eq 'y' ? 'DOMAIN' : $self->domainName($args{id})); 978 ${$args{host}} =~ s/\.*$/\.$pname/ if ${$args{host}} !~ /$pname$/ ;978 ${$args{host}} =~ s/\.*$/\.$pname/ if ${$args{host}} !~ /$pname$/i; 979 979 980 980 ##enhance: Rejig so that we can pass back a WARN red flag, instead of … … 1255 1255 # or the intended parent domain for live records. 1256 1256 my $pname = $self->domainName($args{id}); 1257 ${$args{host}} =~ s/\.*$/\.$pname/ if ${$args{host}} !~ /$pname$/ ;1257 ${$args{host}} =~ s/\.*$/\.$pname/ if ${$args{host}} !~ /$pname$/i; 1258 1258 1259 1259 # check for form; note this checks both normal and "other" hostnames. … … 1337 1337 } else { 1338 1338 my $pname = $self->domainName($args{id}); 1339 ${$args{host}} =~ s/\.*$/\.$pname/ if ${$args{host}} !~ /$pname$/ ;1339 ${$args{host}} =~ s/\.*$/\.$pname/ if ${$args{host}} !~ /$pname$/i; 1340 1340 } 1341 1341 } else {
Note:
See TracChangeset
for help on using the changeset viewer.