]> sipb.mit.edu Git - ikiwiki.git/commitdiff
fix libdir tainting
authorjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>
Tue, 21 Aug 2007 16:47:01 +0000 (16:47 +0000)
committerjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>
Tue, 21 Aug 2007 16:47:01 +0000 (16:47 +0000)
IkiWiki.pm

index 5eef40878e323cf8f991aed8f46d40306297a690..b70f511757dc2f88fc6b62260004bdea60f9555b 100644 (file)
@@ -146,7 +146,7 @@ sub checkconfig () { #{{{
 
 sub loadplugins () { #{{{
        if (defined $config{libdir}) {
-               unshift @INC, $config{libdir};
+               unshift @INC, possibly_foolish_untaint($config{libdir});
        }
 
        loadplugin($_) foreach @{$config{plugin}};
@@ -166,7 +166,8 @@ sub loadplugin ($) { #{{{
 
        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") {
                        require IkiWiki::Plugin::external;
                        import IkiWiki::Plugin::external "$dir/plugins/$plugin";