]> sipb.mit.edu Git - ikiwiki.git/blobdiff - IkiWiki/Render.pm
web commit by http://subvert.org.uk/~bma/: Change of url.
[ikiwiki.git] / IkiWiki / Render.pm
index 35d663a7a6dfce42e492f3fb05ba54e2dd490cde..e4ff2b39b9fdfeb579f31cca750017ec4ad7cb41 100644 (file)
@@ -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;