fix libdir tainting

master
joey 2007-08-21 16:47:01 +00:00
parent 29a0de7197
commit 9ff9ea55f7
1 changed files with 3 additions and 2 deletions

View File

@ -146,7 +146,7 @@ sub checkconfig () { #{{{
sub loadplugins () { #{{{ sub loadplugins () { #{{{
if (defined $config{libdir}) { if (defined $config{libdir}) {
unshift @INC, $config{libdir}; unshift @INC, possibly_foolish_untaint($config{libdir});
} }
loadplugin($_) foreach @{$config{plugin}}; loadplugin($_) foreach @{$config{plugin}};
@ -166,7 +166,8 @@ sub loadplugin ($) { #{{{
return if grep { $_ eq $plugin} @{$config{disable_plugins}}; return if grep { $_ eq $plugin} @{$config{disable_plugins}};
foreach my $dir ($config{libdir}, "$installdir/lib/ikiwiki") { foreach my $dir (possibly_foolish_untaint($config{libdir}),
"$installdir/lib/ikiwiki") {
if (defined $dir && -x "$dir/plugins/$plugin") { if (defined $dir && -x "$dir/plugins/$plugin") {
require IkiWiki::Plugin::external; require IkiWiki::Plugin::external;
import IkiWiki::Plugin::external "$dir/plugins/$plugin"; import IkiWiki::Plugin::external "$dir/plugins/$plugin";