ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/misc/scripts/cgi/taillog.cgi
(Generate patch)

Comparing misc/scripts/cgi/taillog.cgi (file contents):
Revision 1.1 by tdb, Fri Mar 9 00:22:30 2001 UTC vs.
Revision 1.6 by tdb, Sun Aug 1 10:39:51 2004 UTC

# Line 12 | Line 12 | if (defined $grep) {
12          $grepStr = "";
13      }
14      else {
15 <        $grepStr = " | grep $grep";
15 >        if ($grep =~ /^[a-zA-Z_\-0-9\.\/]+$/) {
16 >            $grepStr = " | grep $grep";
17 >        }
18 >        else {
19 >            $grepStr = "";
20 >        }
21      }
22   }
23   else {
# Line 23 | Line 28 | if (!defined $n) {
28      $n = 50;
29   }
30  
31 < unless ($n =~ /^[0-9]{1,4}$/) {
31 > unless ($n =~ /^[0-9]{1,6}$/) {
32      $n = 50;
33   }
34  
# Line 48 | Line 53 | system, unix, linux, nt, server, alert">
53   <body bgcolor="#ffffff" link="#0000ff" alink="#3333cc" vlink="#3333cc"
54   text="#000066">
55  
56 < <a href="http://www.i-scream.org.uk"><img border="0" src="/i-scream.gif"></a>
56 > <a href="http://www.i-scream.org"><img border="0" src="/i-scream.gif"></a>
57  
58   <form method="GET" action="taillog.cgi">
59   <font size="+1"><b>
60 < Last <input type="text" name="n" value="$n" size="4" maxlength="5"> lines
60 > Last <input type="text" name="n" value="$n" size="5" maxlength="5"> lines
61   of the server logfile.
62   | grep </b><input type="text" name="grep" value="$grep" size="20" maxlength="40">
63   <input type="submit" value="Enter">
# Line 88 | Line 93 | sub HTML_encode ($){
93      $encoded =~ s/</&lt;/g;
94      $encoded =~ s/>/&gt;/g;
95      $encoded =~ s/^(.{0})(.*core\.loggers\..*: started)$/<hr size=10 color=blue>$2/;
96 <    $encoded =~ s/(.*)] (.*)}:(.*)/$1] <i>$2<\/i>:<b>$3<\/b>/;
96 >    $encoded =~ s/(.*)] (.*)}:(.*)/$1] <i>$2}<\/i>:<b>$3<\/b>/;
97      return $encoded;
98   }
99  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines