Ignore:
Timestamp:
02/10/26 13:30:58 (3 days ago)
Author:
Kris Deugau
Message:

/branches/stable

Start merging changes from /trunk forward based on changes actually applied
in production

Location:
branches/stable
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/stable

  • branches/stable/dns.cgi

    r756 r1032  
    17341734    my @results;
    17351735    foreach my $domain (@domlist) {
     1736##fixme: Net::DNS has made changes somewhere between 0.66something (~~ Debian wheezy) and
     1737# 0.81 (~~ Debian jessie) that cause taint failures when providing a hostname as a nameserver
     1738# for AXFR.  A proper fix may boil down to "split AXFR into its own script".  Feh.
     1739# For now, we'll just convert the requested AXFR host to an IP, and pass that down the chain instead.
     1740      my $nsip = gethostbyname($webvar{ifrom});
     1741      use Socket;
     1742      $nsip = inet_ntoa($nsip);
     1743      # strangely enough we don't seem to need to detaint:
     1744      #($nsip) = ($nsip =~ /^([a-fA-F0-9:.]+)$/);
    17361745      my %row;
    1737       my ($code,$msg) = $dnsdb->importAXFR($webvar{ifrom}, $domain, $webvar{group},
     1746      my ($code,$msg) = $dnsdb->importAXFR($nsip, $domain, $webvar{group},
    17381747        status => $webvar{domactive}, rwsoa => $webvar{rwsoa}, rwns => $webvar{rwns},
    17391748        newttl => ($webvar{forcettl} ? $webvar{newttl} : 0),
     
    19681977# fill in general URL-to-self
    19691978  $page->param(script_self => "$ENV{SCRIPT_NAME}?");
     1979# fill in the generalized path-to-instance
     1980  $page->param(webpath => ($ENV{SCRIPT_NAME} =~ m|(/.+)/[^/]+$|)[0]);
    19701981}
    19711982
     
    21532164
    21542165  foreach my $rec (@$foo2) {
    2155     $rec->{type} = $typemap{$rec->{type}};
     2166    if ($typemap{$rec->{type}}) {
     2167      $rec->{type} = $typemap{$rec->{type}};
     2168    } else {
     2169      $rec->{type} = "TYPE$rec->{type}";
     2170    }
    21562171    $rec->{fwdzone} = $rev eq 'n';
    21572172    $rec->{ttl} = '(auto)' if $rec->{ttl} == -1;
Note: See TracChangeset for help on using the changeset viewer.