diff options
Diffstat (limited to 'IkiWiki')
-rw-r--r-- | IkiWiki/Render.pm | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/IkiWiki/Render.pm b/IkiWiki/Render.pm index 35d663a7a..e4ff2b39b 100644 --- a/IkiWiki/Render.pm +++ b/IkiWiki/Render.pm @@ -245,6 +245,17 @@ sub prune ($) { #{{{ } #}}} sub refresh () { #{{{ + # security check, avoid following symlinks in the srcdir path + my $test=$config{srcdir}; + while (length $test) { + if (-l $test) { + error("symlink found in srcdir path ($test)"); + } + unless ($test=~s/\/+$//) { + $test=dirname($test); + } + } + # find existing pages my %exists; my @files; |