From 28ee4508e4731d824bd1d9c25095f50010dd7612 Mon Sep 17 00:00:00 2001 From: cjwatson <> Date: Tue, 3 Dec 2002 13:26:06 -0800 Subject: [PATCH] [project @ 2002-12-03 13:26:06 by cjwatson] Remove the final use of cgi-lib.pl, so it's gone. Remove copyright notices that were there due to using it. --- README | 1 - cgi/bugs-fetch2.pl.in | 5 +- cgi/cgi-lib.pl | 203 ------------------------------------------ debian/changelog | 2 + debian/copyright | 1 - scripts/text.in | 5 +- 6 files changed, 7 insertions(+), 210 deletions(-) delete mode 100644 cgi/cgi-lib.pl diff --git a/README b/README index e102b0b..dd27050 100644 --- a/README +++ b/README @@ -69,7 +69,6 @@ COPYRIGHT AND LACK-OF-WARRANTY NOTICE Copyright 1999 Darren O. Benham Copyright 1994,1995,1996,1997 Ian Jackson Copyright 1997 nCipher Corporation Limited -Copyright 1995 Steven Brenner (for cgi-lib.pl). This bug system is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free diff --git a/cgi/bugs-fetch2.pl.in b/cgi/bugs-fetch2.pl.in index f850b65..bfff3c9 100644 --- a/cgi/bugs-fetch2.pl.in +++ b/cgi/bugs-fetch2.pl.in @@ -1,11 +1,12 @@ #!/usr/bin/perl +require './common.pl'; + require '/etc/debbugs/config'; -require './cgi-lib.pl'; %map= ($gMirrors); -ReadParse() or CgiDie("need form data"); +my %in = readparse(); if ($in{'type'} eq 'ref') { $_= $in{'ref'}; diff --git a/cgi/cgi-lib.pl b/cgi/cgi-lib.pl deleted file mode 100644 index bc35ed9..0000000 --- a/cgi/cgi-lib.pl +++ /dev/null @@ -1,203 +0,0 @@ -#!/usr/bin/perl - -# Perl Routines to Manipulate CGI input -# -# Copyright (c) 1995 Steven E. Brenner -# Permission granted to use and modify this library so long as the -# copyright above is maintained, modifications are documented, and -# credit is given for any use of the library. -# -# Thanks are due to many people for reporting bugs and suggestions -# especially Meng Weng Wong, Maki Watanabe, Bo Frese Rasmussen, -# Andrew Dalke, Mark-Jason Dominus, Dave Dittrich, Jason Mathews - -# For more information, see: -# http://www.bio.cam.ac.uk/web/form.html -# http://www.seas.upenn.edu/~mengwong/forms/ - -# Minimalist http form and script (http://www.bio.cam.ac.uk/web/minimal.cgi): -# -# require "cgi-lib.pl"; -# if (&ReadParse(*input)) { -# print &PrintHeader, &PrintVariables(%input); -# } else { -# print &PrintHeader,'
Data: '; -#} - -# ReadParse -# Reads in GET or POST data, converts it to unescaped text, -# creates key/value pairs in %in, using '\0' to separate multiple -# selections - -# Returns TRUE if there was input, FALSE if there was no input -# UNDEF may be used in the future to indicate some failure. - -# Now that cgi scripts can be put in the normal file space, it is useful -# to combine both the form and the script in one place. If no parameters -# are given (i.e., ReadParse returns FALSE), then a form could be output. - -# If a variable-glob parameter (e.g., *cgi_input) is passed to ReadParse, -# information is stored there, rather than in $in, @in, and %in. - -sub ReadParse { - local (*in) = @_ if @_; - local ($i, $key, $val); - - # Read in text - if (&MethGet) { - $in = $ENV{'QUERY_STRING'}; - } elsif (&MethPost) { - read(STDIN,$in,$ENV{'CONTENT_LENGTH'}); - } - - @in = split(/[&;]/,$in); - - foreach $i (0 .. $#in) { - # Convert plus's to spaces - $in[$i] =~ s/\+/ /g; - - # Split into key and value. - ($key, $val) = split(/=/,$in[$i],2); # splits on the first =. - - # Convert %XX from hex numbers to alphanumeric - $key =~ s/%(..)/pack("c",hex($1))/ge; - $val =~ s/%(..)/pack("c",hex($1))/ge; - - # Associate key and value - $in{$key} .= "\0" if (defined($in{$key})); # \0 is the multiple separator - $in{$key} .= $val; - - } - - return scalar(@in); -} - - -# PrintHeader -# Returns the magic line which tells WWW that we're an HTML document - -sub PrintHeader { - return "Content-type: text/html\n\n"; -} - - -# HtmlTop -# Returns the of a document and the beginning of the body -# with the title and a body

header as specified by the parameter - -sub HtmlTop -{ - local ($title) = @_; - - return < - -$title - - -

$title

-END_OF_TEXT -} - -# Html Bot -# Returns the , codes for the bottom of every HTML page - -sub HtmlBot -{ - return "\n\n"; - } - - -# MethGet -# Return true if this cgi call was using the GET request, false otherwise - -sub MethGet { - return ($ENV{'REQUEST_METHOD'} eq "GET"); -} - - -# MethPost -# Return true if this cgi call was using the POST request, false otherwise - -sub MethPost { - return ($ENV{'REQUEST_METHOD'} eq "POST"); -} - - -# MyURL -# Returns a URL to the script - -sub MyURL { - local ($port); - $port = ":" . $ENV{'SERVER_PORT'} if $ENV{'SERVER_PORT'} != 80; - return 'http://' . $ENV{'SERVER_NAME'} . $port . $ENV{'SCRIPT_NAME'}; -} - - -# CgiError -# Prints out an error message which which containes appropriate headers, -# markup, etcetera. -# Parameters: -# If no parameters, gives a generic error message -# Otherwise, the first parameter will be the title and the rest will -# be given as different paragraphs of the body - -sub CgiError { - local (@msg) = @_; - local ($i,$name); - - if (!@msg) { - $name = &MyURL; - @msg = ("Error: script $name encountered fatal error"); - }; - - print &PrintHeader; - print "$msg[0]\n"; - print "

$msg[0]

\n"; - foreach $i (1 .. $#msg) { - print "

$msg[$i]

\n"; - } - print "\n"; -} - - -# CgiDie -# Identical to CgiError, but also quits with the passed error message. - -sub CgiDie { - local (@msg) = @_; - &CgiError (@msg); - die @msg; -} - - -# PrintVariables -# Nicely formats variables in an associative array passed as a parameter -# And returns the HTML string. -sub PrintVariables { - local (%in) = @_; - local ($old, $out, $output); - $old = $*; $* =1; - $output .= "\n
\n"; - foreach $key (sort keys(%in)) { - foreach (split("\0", $in{$key})) { - ($out = $_) =~ s/\n/
\n/g; - $output .= "
$key\n
$out
\n"; - } - } - $output .= "
\n"; - $* = $old; - - return $output; -} - -# PrintVariablesShort -# Now obsolete; just calls PrintVariables - -sub PrintVariablesShort { - return &PrintVariables(@_); -} - -1; #return true - - diff --git a/debian/changelog b/debian/changelog index 5b76bbc..c302c6c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -9,6 +9,8 @@ debbugs (2.4.1) UNRELEASED; urgency=low * Add missing
    tags to db2html's output, closes: #50746. [Colin] * Add a 'submitter' command to service, based on a patch by Matt Kraai. [Colin] + * Remove the final use of cgi-lib.pl, so it's gone. Remove copyright + notices that were there due to using it. [Colin] -- Colin Watson Mon, 25 Nov 2002 03:50:20 +0000 diff --git a/debian/copyright b/debian/copyright index cfcc758..52341d1 100644 --- a/debian/copyright +++ b/debian/copyright @@ -14,7 +14,6 @@ The sources can be found at: Copyright 1999 Darren O. Benham Copyright 1994,1995,1996,1997 Ian Jackson Copyright 1997 nCipher Corporation Limited -Copyright 1995 Steven Brenner (for cgi-lib.pl). This bug system is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free diff --git a/scripts/text.in b/scripts/text.in index 2cfff75..6acf6f0 100644 --- a/scripts/text.in +++ b/scripts/text.in @@ -1,4 +1,4 @@ -# $Id: text.in,v 1.16 2002/12/03 12:30:18 cjwatson Exp $ +# $Id: text.in,v 1.17 2002/12/03 13:26:06 cjwatson Exp $ ############################################################################ # Here is a blurb to point people to ftp archive of directions. It is @@ -186,8 +186,7 @@ $gHTMLTail = "

    Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, - 1994-97 Ian Jackson, - 1995 Steven Brenner. + 1994-97 Ian Jackson.
    Available under the GPL. -- 2.39.2