deep copy/untaint arrays in setup
parent
49fc2283f7
commit
fe6b271501
|
@ -141,7 +141,7 @@ sub preprocess ($$) { #{{{
|
||||||
return $plugins{preprocess}{$command}->(page => $page, %params);
|
return $plugins{preprocess}{$command}->(page => $page, %params);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
return "[[bad directive $command]]";
|
return "[[$command not processed]]";
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -28,11 +28,22 @@ sub setup_standard {
|
||||||
gen_wrapper();
|
gen_wrapper();
|
||||||
}
|
}
|
||||||
%config=(%startconfig);
|
%config=(%startconfig);
|
||||||
|
delete $config{wrappers};
|
||||||
}
|
}
|
||||||
foreach my $c (keys %setup) {
|
foreach my $c (keys %setup) {
|
||||||
$config{$c}=possibly_foolish_untaint($setup{$c})
|
if (defined $setup{$c}) {
|
||||||
if defined $setup{$c} && ! ref $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}) {
|
if (! $config{refresh}) {
|
||||||
$config{rebuild}=1;
|
$config{rebuild}=1;
|
||||||
debug("rebuilding wiki..");
|
debug("rebuilding wiki..");
|
||||||
|
|
Loading…
Reference in New Issue