ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/web/cgi-bin/docs.cgi
(Generate patch)

Comparing web/cgi-bin/docs.cgi (file contents):
Revision 1.4 by pjm2, Thu Feb 8 21:17:47 2001 UTC vs.
Revision 1.5.2.1 by tdb, Sun May 11 19:51:06 2003 UTC

# Line 13 | Line 13 | use CGI;
13   $| = 1;
14  
15   # Settings
16 < my ($left) = "../left.inc" ;
17 < my ($title) = "../title.inc";
18 < my ($bottom) = "../bottom.inc";
16 > my ($left) = "../htdocs/left.inc" ;
17 > my ($title) = "../htdocs/title.inc";
18 > my ($bottom) = "../htdocs/bottom.inc";
19  
20  
21   my ($query) = new CGI;
# Line 34 | Line 34 | unless (defined $doc) {
34   # Prevent hackers from supplying a malformed document string.
35   # I.e. only allow normal characters, slashes and dots.
36   unless ($doc =~ /^[a-zA-Z_\-0-9\.\/]+$/) {
37 <    print "Go Away, you nasty hax0r!";
37 >    print "Malformed request";
38      exit;
39   }
40 < $doc = "../documentation/".$doc;
40 > $doc = "../htdocs/documentation/".$doc;
41  
42   print <<"END";
43   <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
# Line 125 | Line 125 | sub print_file ($) {
125   # Print a file without escaping HTML: -
126   sub print_html ($) {
127      my ($filename) = @_;
128 <    print `cat $filename`;
128 >    print `cat $filename 2>&1`;
129   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines