X-Git-Url: https://sipb.mit.edu/gitweb.cgi/ikiwiki.git/blobdiff_plain/dd349d69ea2361360b4534d9c77806345ff490ad..0ca6aef1e9db412c03288a069ebfa7c91d0b2468:/IkiWiki.pm diff --git a/IkiWiki.pm b/IkiWiki.pm index 01798941c..4e4da11c5 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -395,6 +395,13 @@ sub getsetup () { #{{{ safe => 0, rebuild => 0, }, + allow_symlinks_before_srcdir => { + type => "string", + default => 0, + description => "allow symlinks in the path leading to the srcdir (potentially insecure)", + safe => 0, + rebuild => 0, + }, } #}}} sub defaultconfig () { #{{{ @@ -513,7 +520,11 @@ sub loadplugin ($) { #{{{ foreach my $dir (defined $config{libdir} ? possibly_foolish_untaint($config{libdir}) : undef, "$installdir/lib/ikiwiki") { if (defined $dir && -x "$dir/plugins/$plugin") { - require IkiWiki::Plugin::external; + eval { require IkiWiki::Plugin::external }; + if ($@) { + my $reason=$@; + error(sprintf(gettext("failed to load external plugin needed for %s plugin: %s"), $plugin, $reason)); + } import IkiWiki::Plugin::external "$dir/plugins/$plugin"; $loaded_plugins{$plugin}=1; return 1;