Changeset 80 for trunk/uribl/uridb.cgi
- Timestamp:
- 09/11/25 16:28:23 (4 days ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/uribl/uridb.cgi
r62 r80 3 3 ## 4 4 # $Id$ 5 # Copyright 2010 Kris Deugau <kdeugau@deepnet.cx>5 # Copyright 2010,2025 Kris Deugau <kdeugau@deepnet.cx> 6 6 # 7 7 # This program is free software: you can redistribute it and/or modify … … 22 22 use warnings; 23 23 no warnings qw(uninitialized); 24 24 25 use CGI::Carp qw (fatalsToBrowser); 25 26 use CGI::Simple; … … 27 28 use Encode; 28 29 29 use URIdb; 30 # push "the directory the script is in" into @INC 31 use FindBin; 32 use lib "$FindBin::RealBin/"; 33 34 use URIdb 2.0; 30 35 31 36 # Set up the CGI object... … … 40 45 } 41 46 42 my $uridb = new URIdb;43 44 47 print $q->header(-charset=>'utf8'); 45 46 # default DB info - all other settings should be loaded from the DB.47 my $dbhost = "localhost";48 my $dbname = "uridb";49 my $dbuser = "uridb";50 my $dbpass = "spambgone";51 48 52 49 #my %status = (0 => "Don't list", … … 64 61 $cfgname =~ s|_uridb_cgi.*||; 65 62 $cfgname =~ s|_$||; 66 if (-e "/etc/uridb/$cfgname.conf") {67 my $cfg = `cat /etc/uridb/$cfgname.conf`;68 ($cfg) = ($cfg =~ /^(.+)$/s); # avoid warnings, failures, and general nastiness with taint mode69 eval $cfg;70 }71 63 72 my $ dbh = $uridb->connect($dbhost, $dbname, $dbuser, $dbpass);64 my $uridb = new URIdb (configfile => "/etc/uridb/$cfgname.conf"); 73 65 74 66 my $page;
Note:
See TracChangeset
for help on using the changeset viewer.