diff options
author | joey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071> | 2006-03-10 09:21:14 +0000 |
---|---|---|
committer | joey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071> | 2006-03-10 09:21:14 +0000 |
commit | eeb4e694d324b3c78a585b2e80202a03b3cda405 (patch) | |
tree | a51444fa2b141dcf5c41e2c53630e7d9daec887b | |
parent | d5566303d6b416fb4b0f49a4a7eae2c81bddf17e (diff) |
clarity
-rwxr-xr-x | ikiwiki | 12 |
1 files changed, 9 insertions, 3 deletions
@@ -37,6 +37,12 @@ sub mtime ($) { return (stat($page))[9]; } +sub possibly_foolish_untaint ($) { + my $tainted=shift; + my ($untainted)=$tainted=~/(.*)/; + return $untainted; +} + sub basename { my $file=shift; @@ -281,7 +287,7 @@ sub render ($) { sub loadindex () { open (IN, "$srcdir/.index") || return; while (<IN>) { - ($_)=/(.*)/; # untaint + $_=possibly_foolish_untaint($_); chomp; my ($mtime, $file, $rendered, @links)=split(' ', $_); my $page=pagename($file); @@ -500,8 +506,8 @@ if (grep /^-/, @ARGV) { ) || 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'); |