Changeset 702


Ignore:
Timestamp:
12/31/15 12:02:57 (9 years ago)
Author:
Kris Deugau
Message:

/trunk

Refine the DNS query to chomp leading and trailing whitespace, since it
will cause Net::DNS errors.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dns.cgi

    r666 r702  
    16211621} elsif ($webvar{page} eq 'dnsq') {
    16221622
    1623   $page->param(qfor => $webvar{qfor}) if $webvar{qfor};
     1623  if ($webvar{qfor}) {
     1624    $webvar{qfor} =~ s/^\s*//;
     1625    $webvar{qfor} =~ s/\s*$//;
     1626    $page->param(qfor => $webvar{qfor});
     1627  }
     1628  if ($webvar{resolver}) {
     1629    $webvar{resolver} =~ s/^\s*//;
     1630    $webvar{resolver} =~ s/\s*$//;
     1631    $page->param(resolver => $webvar{resolver});
     1632  }
    16241633  $page->param(typelist => $dnsdb->getTypelist('l', ($webvar{type} ? $webvar{type} : undef)));
    16251634  $page->param(nrecurse => $webvar{nrecurse}) if $webvar{nrecurse};
    1626   $page->param(resolver => $webvar{resolver}) if $webvar{resolver};
    16271635
    16281636  if ($webvar{qfor}) {
Note: See TracChangeset for help on using the changeset viewer.