Changeset 419


Ignore:
Timestamp:
10/10/12 13:14:39 (12 years ago)
Author:
Kris Deugau
Message:

/branches/stable

Merge no-spaces-in-host-or-value fix from r417 and r418. Note r417
seemed to bring in ~150 extra lines.
Bump patch version numbers.

Location:
branches/stable
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/stable

  • branches/stable/DNSDB.pm

    r317 r419  
    3232use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
    3333
    34 $VERSION        = 1.0.1;        ##VERSION##
     34$VERSION        = 1.0.2;        ##VERSION##
    3535@ISA            = qw(Exporter);
    3636@EXPORT_OK      = qw(
     
    13881388  my $ttl = shift;
    13891389
     1390  # Spaces are evil.
     1391  $host =~ s/^\s+//;
     1392  $host =~ s/\s+$//;
     1393  if ($typemap{$rectype} ne 'TXT') {
     1394    # Leading or trailng spaces could be legit in TXT records.
     1395    $val =~ s/^\s+//;
     1396    $val =~ s/\s+$//;
     1397  }
     1398
    13901399  # Validation
    13911400  my $addr = NetAddr::IP->new($val);
     
    14711480
    14721481  return('FAIL',"Missing standard argument(s)") if !defined($ttl);
     1482
     1483  # Spaces are evil.
     1484  $host =~ s/^\s+//;
     1485  $host =~ s/\s+$//;
     1486  if ($typemap{$type} ne 'TXT') {
     1487    # Leading or trailng spaces could be legit in TXT records.
     1488    $val =~ s/^\s+//;
     1489    $val =~ s/\s+$//;
     1490  }
    14731491
    14741492# only MX and SRV will use these
     
    19731991# of remaining data, allows up to 255 raw bytes
    19741992
     1993        # Spaces are evil.
     1994        $host =~ s/^\s+//;
     1995        $host =~ s/\s+$//;
     1996        if ($typemap{$type} ne 'TXT') {
     1997          # Leading or trailng spaces could be legit in TXT records.
     1998          $val =~ s/^\s+//;
     1999          $val =~ s/\s+$//;
     2000        }
     2001
    19752002##fixme?  append . to all host/val hostnames
    19762003      if ($typemap{$type} eq 'SOA') {
  • branches/stable/Makefile

    r317 r419  
    33
    44PKGNAME=dnsadmin
    5 VERSION=1.0.1
     5VERSION=1.0.2
    66RELEASE=1
    77
  • branches/stable/dns.cgi

    r317 r419  
    609609    # prevent out-of-domain records from getting added by appending the domain, or DOMAIN for default records
    610610    my $pname = ($webvar{defrec} eq 'y' ? 'DOMAIN' : domainName($dbh,$webvar{parentid}));
     611    $webvar{name} =~ s/\s+$//;
    611612    $webvar{name} =~ s/\.*$/\.$pname/ if $webvar{name} !~ /$pname$/;
    612613
Note: See TracChangeset for help on using the changeset viewer.