Changeset 1032 for branches/stable/dns.cgi
- Timestamp:
- 02/10/26 13:30:58 (3 days ago)
- Location:
- branches/stable
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/stable
- Property svn:mergeinfo changed
/trunk merged: 750-755,758-772
- Property svn:mergeinfo changed
-
branches/stable/dns.cgi
r756 r1032 1734 1734 my @results; 1735 1735 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:.]+)$/); 1736 1745 my %row; 1737 my ($code,$msg) = $dnsdb->importAXFR($ webvar{ifrom}, $domain, $webvar{group},1746 my ($code,$msg) = $dnsdb->importAXFR($nsip, $domain, $webvar{group}, 1738 1747 status => $webvar{domactive}, rwsoa => $webvar{rwsoa}, rwns => $webvar{rwns}, 1739 1748 newttl => ($webvar{forcettl} ? $webvar{newttl} : 0), … … 1968 1977 # fill in general URL-to-self 1969 1978 $page->param(script_self => "$ENV{SCRIPT_NAME}?"); 1979 # fill in the generalized path-to-instance 1980 $page->param(webpath => ($ENV{SCRIPT_NAME} =~ m|(/.+)/[^/]+$|)[0]); 1970 1981 } 1971 1982 … … 2153 2164 2154 2165 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 } 2156 2171 $rec->{fwdzone} = $rev eq 'n'; 2157 2172 $rec->{ttl} = '(auto)' if $rec->{ttl} == -1;
Note:
See TracChangeset
for help on using the changeset viewer.
![[ DNS Administrator ]](/fx/dnsadmin-logo.png)