return (stat($page))[9];
}
+sub possibly_foolish_untaint ($) {
+ my $tainted=shift;
+ my ($untainted)=$tainted=~/(.*)/;
+ return $untainted;
+}
+
sub basename {
my $file=shift;
sub loadindex () {
open (IN, "$srcdir/.index") || return;
while (<IN>) {
- ($_)=/(.*)/; # untaint
+ $_=possibly_foolish_untaint($_);
chomp;
my ($mtime, $file, $rendered, @links)=split(' ', $_);
my $page=pagename($file);
) || usage();
}
usage() unless @ARGV == 2;
-($srcdir) = shift =~ /(.*)/; # untaint
-($destdir) = shift =~ /(.*)/; # untaint
+($srcdir) = possibly_foolish_untaint(shift);
+($destdir) = possibly_foolish_untaint(shift);
gen_wrapper($offline, $rebuild) if $gen_wrapper;
memoize('pagename');