Changeset 1055 for trunk


Ignore:
Timestamp:
03/19/26 12:36:05 (3 days ago)
Author:
Kris Deugau
Message:

/trunk

Update include path finder in dns-rpc.cgi - see #80

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dns-rpc.cgi

    r1053 r1055  
    2222use warnings;
    2323
    24 # push "the directory the script is in" into @INC
    25 use FindBin;
    26 use lib "$FindBin::RealBin/";
     24# Taint-safe (ish) voodoo to push "the directory the script is in" into @INC.
     25# See https://secure.deepnet.cx/trac/dnsadmin/ticket/80 for more gory details on how we got here.
     26use File::Spec ();
     27use File::Basename ();
     28my $path;
     29BEGIN {
     30    $path = File::Basename::dirname(File::Spec->rel2abs($0));
     31    if ($path =~ /(.*)/) {
     32        $path = $1;
     33    }
     34}
     35use lib $path;
    2736
    2837use DNSDB;
Note: See TracChangeset for help on using the changeset viewer.