X-Git-Url: https://git.adam-barratt.org.uk/?p=mirror%2Fuserdir-ldap-cgi.git;a=blobdiff_plain;f=fetchkey.cgi;h=d2d5881378b87694dff53f437ad2bf65a02b7b7a;hp=a9d8539b1dbd0a1148dd739e694022a5e1cc97d9;hb=HEAD;hpb=03b5d4275693c3f5a701b9e22e04af8ef57d0a58 diff --git a/fetchkey.cgi b/fetchkey.cgi index a9d8539..d2d5881 100755 --- a/fetchkey.cgi +++ b/fetchkey.cgi @@ -1,22 +1,29 @@ -#!/usr/bin/perl +#!/usr/bin/perl -wT -# $Id: fetchkey.cgi,v 1.2 1999/09/26 01:20:39 tausq Exp $ +# $Id: fetchkey.cgi,v 1.4 2004/11/18 14:23:05 joey Exp $ # (c) 1999 Randolph Chung. Licensed under the GPL. +use lib '.'; use strict; use CGI; use Util; # Global settings... my %config = &Util::ReadConfigFile; +for my $key (keys %config) { + $key =~ /(.*)/; + $config{$key} = $1; +} my $query = new CGI; print "Content-type: text/plain\n\n"; my $fp = $query->param('fingerprint'); +$fp =~ /^([A-Fa-f0-9]+)$/; +$fp = $1; if ($fp) { - my $key = &Util::FetchKey($fp); + my $key = &Util::FetchKey($fp, 0); if ($key) { print $key; } else {