Changeset 780 for trunk/cgi-bin/main.cgi


Ignore:
Timestamp:
10/07/15 18:12:25 (9 years ago)
Author:
Kris Deugau
Message:

/trunk

  • Revert most examples in MyIPDB.pm to defaults.
  • Add new flag to retrieve/show unique/custom per-IP rDNS on IP pools rather than having to either visit each IP individually or use the primary DNS management UI
  • Add final safety valve in the UI to limit per-IP rDNS lists to 1K (10 bits). Even a /26 is a bit slow; a /24 takes over a second even on lightly-loaded hardware over local loopback.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/cgi-bin/main.cgi

    r771 r780  
    592592    if ($IPDBacl{$authuser} =~ /c/
    593593        && $cidr->masklen != $cidr->bits
    594         && ($cidr->bits - $cidr->masklen) <= $IPDB::maxrevlist
    595         && $webvar{alloctype} !~ /^.[dpi]/
     594        && ($cidr->bits - $cidr->masklen) <= $IPDB::maxrevlist
     595        # config flag for "all block types" OR "not-a-pool-or-IP type"
     596        && ($IPDB::revlistalltypes || $webvar{alloctype} !~ /^.[dpi]/)
     597        # safety against trying to retrieve and display more than 1k (10 bits, /22 v4) worth of individual IPs
     598        # ever.  If you really need to manage a long list of IPs like that all in one place, you can use the DNS
     599        # management tool.  Even a /26 is a bit much, really.
     600        && ($cidr->bits - $cidr->masklen) <= 10
    596601        # do we want to allow v6 at all?
    597602        #&& ! $cidr->{isv6}
     
    917922        && $cidr->masklen != $cidr->bits
    918923        && ($cidr->bits - $cidr->masklen) <= $IPDB::maxrevlist
    919         && $blockinfo->{type} !~ /^.[dpi]/
     924        # config flag for "all block types" OR "not-a-pool-or-IP type"
     925        && ($IPDB::revlistalltypes || $blockinfo->{type} !~ /^.[dpi]/)
     926        # safety against trying to retrieve and display more than 1k (10 bits, /22 v4) worth of individual IPs
     927        # ever.  If you really need to manage a long list of IPs like that all in one place, you can use the DNS
     928        # management tool.  Even a /26 is a bit much, really.
     929        && ($cidr->bits - $cidr->masklen) <= 10
    920930        # do we want to allow v6 at all?
    921931        #&& ! $cidr->{isv6}
Note: See TracChangeset for help on using the changeset viewer.