=================================================================== RCS file: /cvs/cvsweb/cvsweb.cgi,v retrieving revision 1.1.1.3 retrieving revision 3.14 diff -u -p -r1.1.1.3 -r3.14 --- cvsweb/cvsweb.cgi 2000/08/25 09:13:40 1.1.1.3 +++ cvsweb/cvsweb.cgi 2000/08/24 15:53:11 3.14 @@ -42,7 +42,7 @@ # SUCH DAMAGE. # # $zId: cvsweb.cgi,v 1.94 2000/08/24 06:41:22 hnordstrom Exp $ -# $kId: cvsweb.cgi,v 1.15 2000/08/25 09:01:58 knu Exp $ +# $Id: cvsweb.cgi,v 3.14 2000/08/24 15:53:11 knu Exp $ # ### @@ -949,10 +949,6 @@ sub link($$) { sub revcmp($$) { my($rev1, $rev2) = @_; - - # make no comparison for a tag or a branch - return 0 if $rev1 =~ /[^\d.]/ || $rev2 =~ /[^\d.]/; - my(@r1) = split(/\./, $rev1); my(@r2) = split(/\./, $rev2); my($a,$b); @@ -1067,7 +1063,7 @@ sub doAnnotate($$) { # make sure the revisions a wellformed, for security # reasons .. - if ($rev =~ /[^\w.]/) { + if (!($rev =~ /^[\d\.]+$/)) { &fatal("404 Not Found", "Malformed query \"$ENV{QUERY_STRING}\""); } @@ -1218,13 +1214,9 @@ sub doCheckout($$) { my ($mimetype,$revopt); my $fh = do {local(*FH);}; - if ($rev eq 'HEAD' || $rev eq '.') { - $rev = undef; - } - # make sure the revisions a wellformed, for security # reasons .. - if (defined($rev) && $rev =~ /[^\w.]/) { + if (defined($rev) && !($rev =~ /^[\d\.]+$/)) { &fatal("404 Not Found", "Malformed query \"$ENV{QUERY_STRING}\""); } @@ -1260,7 +1252,7 @@ sub doCheckout($$) { # Safely for a child process to read from. if (! open($fh, "-|")) { # child open(STDERR, ">&STDOUT"); # Redirect stderr to stdout - exec("cvs", "-Rld", $cvsroot, "co", "-p", $revopt, $where); + exec("cvs", "-d", $cvsroot, "co", "-p", $revopt, $where); } #=================================================================== #Checking out squid/src/ftp.c @@ -1377,10 +1369,9 @@ sub doDiff($$$$$$) { $rev2 = $tr2; $sym2 = ""; } - # make sure the revisions a wellformed, for security # reasons .. - if ($rev1 =~ /[^\w.]/ || $rev2 =~ /[^\w.]/) { + if (!($rev1 =~ /^[\d\.]+$/) || !($rev2 =~ /^[\d\.]+$/)) { &fatal("404 Not Found", "Malformed query \"$ENV{QUERY_STRING}\""); } @@ -1422,7 +1413,7 @@ sub doDiff($$$$$$) { # apply special options if ($showfunc) { - push @difftype, '-p' if $f =~ /^[cHhu]$/; + push @difftype, '-p'; my($re1, $re2); @@ -2382,7 +2373,7 @@ sub navigateHeader($$$$$) { $swhere = urlencode($filename) if ($swhere eq ""); print "<\!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">"; print "\n\n"; - print ''; + print ''; print "\n$path$filename - $title - $rev\n"; print "\n"; print ""; @@ -2734,7 +2725,7 @@ sub http_header(;$) { sub html_header($) { my ($title) = @_; - my $version = '$zRevision: 1.94 $ $kRevision: 1.15 $'; #' + my $version = '$zRevision: 1.94 $ $Revision: 3.14 $'; #' http_header(); print <