Ignore:
Timestamp:
02/27/26 16:40:46 (7 hours ago)
Author:
Kris Deugau
Message:

/branches/stable

Rollup merge through r909 for core dnsadmin - excludes BIND export, changes
to auxiliary scripts (compatc-recs.pl, mergerecs.pl, etc)

Location:
branches/stable
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/stable

  • branches/stable/dns.cgi

    r1033 r1047  
    33##
    44# $Id$
    5 # Copyright 2008-2019 Kris Deugau <kdeugau@deepnet.cx>
     5# Copyright 2008-2020 Kris Deugau <kdeugau@deepnet.cx>
    66#
    77#    This program is free software: you can redistribute it and/or modify
     
    3535#  return ! eval { eval("#" . substr(join("", @_), 0, 0)); 1 };
    3636#}
    37 #use Cwd 'abs_path';
    38 #use File::Basename;
    39 #use lib dirname( abs_path $0 );
    40 #die "argh!  tainted!" if is_tainted($0);
    41 #die "argh! \@INC got tainted!" if is_tainted(@INC);
    42 
    43 # don't remove!  required for GNU/FHS-ish install from tarball
    44 use lib '.';    ##uselib##
     37
     38# Taint-safe (ish) voodoo to push "the directory the script is in" into @INC.
     39# See https://secure.deepnet.cx/trac/dnsadmin/ticket/80 for more gory details on how we got here.
     40use File::Spec ();
     41use File::Basename ();
     42my $path;
     43BEGIN {
     44    $path = File::Basename::dirname(File::Spec->rel2abs($0));
     45    if ($path =~ /(.*)/) {
     46        $path = $1;
     47    }
     48}
     49use lib $path;
    4550
    4651use DNSDB;
     
    120125$webvar{startwith} =~ s/^(0-9|[a-z]).*/$1/ if $webvar{startwith};
    121126# not much call for chars not allowed in domain names
    122 $webvar{filter} =~ s/[^a-zA-Z0-9_.:\@%-]//g if $webvar{filter};
     127# allow <>= so searches can use the Postgres CIDR operators
     128# allow , for things like DMARC records
     129$webvar{filter} =~ s{[^a-zA-Z0-9_.,:\@%<>=/-]}{}g if $webvar{filter};
    123130## only set 'y' if box is checked, no other values legal
    124131## however, see https://secure.deepnet.cx/trac/dnsadmin/ticket/31
     
    18971904  # need to search on characters outside this set until we get into IDNs
    18981905  # note this is a little larger due to template records
    1899   $webvar{searchfor} =~ s/[^a-zA-Z0-9_.:\@%-]//g if $webvar{searchfor};
     1906  # allow <>= so searches can use the Postgres CIDR operators
     1907  # allow , for things like DMARC records
     1908  $webvar{searchfor} =~ s{[^a-zA-Z0-9_.,:\@%<>=/-]}{}g if $webvar{searchfor};
    19001909
    19011910  # save the search in the session, same as the "filter" in various other lists...
     
    23472356#  }
    23482357  $page->param(domtable => $zonelist);
    2349 } # end listdomains()
     2358} # end listzones()
    23502359
    23512360
Note: See TracChangeset for help on using the changeset viewer.