Changeset 905 for trunk


Ignore:
Timestamp:
08/11/25 17:00:31 (13 hours ago)
Author:
Kris Deugau
Message:

/trunk

Ad hoc patches from workspace: Clean up passed CIDR validation in
RPC delByCIDR() so we don't end up with a DNS lookup result from a non-IP
value that happens to resolve

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dns-rpc.cgi

    r904 r905  
    16411641  die "Need location\n" if !defined($args{location});
    16421642
     1643  # quick sanity-check version
     1644  die "CIDR is either poorly formed or not an IP/netblock at all\n" if !DNSDB::_maybeip(\$args{cidr});
     1645  my $cidr = new NetAddr::IP $args{cidr};
     1646  die "CIDR is not a valid IP/netblock\n" if !$cidr;
     1647
    16431648  # much like addOrUpdateRevRec()
    16441649  my $zonelist = $dnsdb->getZonesByCIDR(%args);
    1645   my $cidr = new NetAddr::IP $args{cidr};
    16461650
    16471651  if (scalar(@$zonelist) == 0) {
Note: See TracChangeset for help on using the changeset viewer.