3 require '/etc/debbugs/config';
4 require './cgi-lib.pl';
8 ReadParse() or CgiDie("need form data");
10 if ($in{'type'} eq 'ref') {
12 s/^\s+//; s/^\#//; s/^\s+//; s/^0*//; s/\s+$//;
14 if (m/\D/ || !m/\d/) {
16 Content-Type: text/html
18 <html><head><title>Bug number not numeric</title>
20 <h1>Invalid input to specific bug fetch form</h1>
22 You must type a number, being the bug reference number.
23 There should be no nondigits in your entry.
29 $suburl =~ s,^..,$&/$&,;
31 } elsif ($in{'type'} eq 'package') {
33 s/^\s+//; s/\s+$//; y/A-Z/a-z/;
34 if (m/^[^0-9a-z]/ || m/[^-+.0-9a-z]/) {
36 Content-Type: text/html
38 <html><head><title>Package name contains invalid characters</title>
40 <h1>Invalid input to package buglist fetch form</h1>
42 You must type a package name. Package names start with a letter
43 or digit and contain only letters, digits and the characters
44 - + . (hyphen, plus, full stop).
49 $suburl= "pa/l$_.html";
52 Content-Type: text/plain
54 Please use the real DBC_WHO form. (invalid type value)
59 $base= $ENV{'HTTP_REFERER'};
60 if ($base =~ s:/Bugs/.*$::) {
62 $base= $map{$y} if $base eq $y;
68 $newurl= "$base/Bugs/db/$suburl";
73 The bug report data you are looking for ($suburl)
74 is available <A href="$newurl">here</A>.
76 (If this link does not work then the bug or package does not exist in
77 the tracking system any more, or does not yet, or never did.)