diff options
author | joey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071> | 2006-05-02 04:18:44 +0000 |
---|---|---|
committer | joey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071> | 2006-05-02 04:18:44 +0000 |
commit | fe6b271501d4d8ae00a012d14a8814cee5e0e55d (patch) | |
tree | 44e74ae125cfd191b482beed98d551c6f229b35f /IkiWiki/Setup | |
parent | 49fc2283f7d3dc18b118aa11c4b0bf4ef58d1a39 (diff) |
deep copy/untaint arrays in setup
Diffstat (limited to 'IkiWiki/Setup')
-rw-r--r-- | IkiWiki/Setup/Standard.pm | 15 |
1 files changed, 13 insertions, 2 deletions
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.."); |