From: Don Armstrong Date: Fri, 15 Aug 2008 22:01:37 +0000 (-0700) Subject: move bugs-fetch X-Git-Tag: release/2.6.0~472^2~22 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=c41eb7502274218ebbcfa2baa888cd1f49edfdc1;p=debbugs.git move bugs-fetch --- diff --git a/cgi/bugs-fetch2.pl b/cgi/bugs-fetch2.pl new file mode 100644 index 00000000..496c0927 --- /dev/null +++ b/cgi/bugs-fetch2.pl @@ -0,0 +1,72 @@ +#!/usr/bin/perl + +require './common.pl'; + +require '/etc/debbugs/config'; + +%map= ($gMirrors); + +my %in = readparse(); + +if ($in{'type'} eq 'ref') { + $_= $in{'ref'}; + s/^\s+//; s/^\#//; s/^\s+//; s/^0*//; s/\s+$//; + + if (m/\D/ || !m/\d/) { + print <Bug number not numeric + +

Invalid input to specific bug fetch form

+ +You must type a number, being the bug reference number. +There should be no nondigits in your entry. + +END + exit(0); + } + $suburl= "bugreport.cgi?bug=$_"; +} elsif ($in{'type'} eq 'package') { + $_= $in{'package'}; + s/^\s+//; s/\s+$//; y/A-Z/a-z/; + if (m/^[^0-9a-z]/ || m/[^-+.0-9a-z]/) { + print <Package name contains invalid characters + +

Invalid input to package buglist fetch form

+ +You must type a package name. Package names start with a letter +or digit and contain only letters, digits and the characters +- + . (hyphen, plus, full stop). + +END + exit(0); + } + $suburl= "pkgreport.cgi?pkg=$_"; +} else { + print <here. + +(If this link does not work then the bug or package does not exist in +the tracking system any more, or does not yet, or never did.) +END + +exit(0); diff --git a/cgi/bugs-fetch2.pl.in b/cgi/bugs-fetch2.pl.in deleted file mode 100644 index 496c0927..00000000 --- a/cgi/bugs-fetch2.pl.in +++ /dev/null @@ -1,72 +0,0 @@ -#!/usr/bin/perl - -require './common.pl'; - -require '/etc/debbugs/config'; - -%map= ($gMirrors); - -my %in = readparse(); - -if ($in{'type'} eq 'ref') { - $_= $in{'ref'}; - s/^\s+//; s/^\#//; s/^\s+//; s/^0*//; s/\s+$//; - - if (m/\D/ || !m/\d/) { - print <Bug number not numeric - -

Invalid input to specific bug fetch form

- -You must type a number, being the bug reference number. -There should be no nondigits in your entry. - -END - exit(0); - } - $suburl= "bugreport.cgi?bug=$_"; -} elsif ($in{'type'} eq 'package') { - $_= $in{'package'}; - s/^\s+//; s/\s+$//; y/A-Z/a-z/; - if (m/^[^0-9a-z]/ || m/[^-+.0-9a-z]/) { - print <Package name contains invalid characters - -

Invalid input to package buglist fetch form

- -You must type a package name. Package names start with a letter -or digit and contain only letters, digits and the characters -- + . (hyphen, plus, full stop). - -END - exit(0); - } - $suburl= "pkgreport.cgi?pkg=$_"; -} else { - print <here. - -(If this link does not work then the bug or package does not exist in -the tracking system any more, or does not yet, or never did.) -END - -exit(0);