summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2006-05-02 04:18:44 +0000
committerjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2006-05-02 04:18:44 +0000
commitfe6b271501d4d8ae00a012d14a8814cee5e0e55d (patch)
tree44e74ae125cfd191b482beed98d551c6f229b35f
parent49fc2283f7d3dc18b118aa11c4b0bf4ef58d1a39 (diff)
deep copy/untaint arrays in setup
-rw-r--r--IkiWiki/Render.pm2
-rw-r--r--IkiWiki/Setup/Standard.pm15
2 files changed, 14 insertions, 3 deletions
diff --git a/IkiWiki/Render.pm b/IkiWiki/Render.pm
index f9730193b..9ece00157 100644
--- a/IkiWiki/Render.pm
+++ b/IkiWiki/Render.pm
@@ -141,7 +141,7 @@ sub preprocess ($$) { #{{{
return $plugins{preprocess}{$command}->(page => $page, %params);
}
else {
- return "[[bad directive $command]]";
+ return "[[$command not processed]]";
}
};
diff --git a/IkiWiki/Setup/Standard.pm b/IkiWiki/Setup/Standard.pm
index a13e7805a..9883b922a 100644
--- a/IkiWiki/Setup/Standard.pm
+++ b/IkiWiki/Setup/Standard.pm
@@ -28,11 +28,22 @@ sub setup_standard {
gen_wrapper();
}
%config=(%startconfig);
+ delete $config{wrappers};
}
foreach my $c (keys %setup) {
- $config{$c}=possibly_foolish_untaint($setup{$c})
- if defined $setup{$c} && ! ref $setup{$c};
+ if (defined $setup{$c}) {
+ if (! ref $setup{$c}) {
+ $config{$c}=possibly_foolish_untaint($setup{$c});
+ }
+ elsif (ref $setup{$c} eq 'ARRAY') {
+ $config{$c}=[map { possibly_foolish_untaint($_) } @{$setup{$c}}]
+ }
+ }
+ else {
+ $config{$c}=undef;
+ }
}
+
if (! $config{refresh}) {
$config{rebuild}=1;
debug("rebuilding wiki..");