diff options
author | Joey Hess <joey@kodama.kitenet.net> | 2008-07-21 18:33:09 -0400 |
---|---|---|
committer | Joey Hess <joey@kodama.kitenet.net> | 2008-07-21 18:33:09 -0400 |
commit | c2a2f715087a4602876618fdec2fad073308a6d5 (patch) | |
tree | 3a0f7c149a78d9d1274707a3144b6775b5359c91 /IkiWiki | |
parent | e630e7507ea253680750e670d7d213bc5ca3e57a (diff) | |
download | ikiwiki-c2a2f715087a4602876618fdec2fad073308a6d5.tar ikiwiki-c2a2f715087a4602876618fdec2fad073308a6d5.tar.gz |
Add allow_symlinks_before_srcdir config setting
can be used to avoid a security check that is a good safe default, but
problimatic overkill in some situations.
I decided to underdocument this, because the option looks ugly, and I don't
want people randomly turning it on because it looks like a good idea. So if
you need it, you'll get an error message mentioning how to fix it.
Diffstat (limited to 'IkiWiki')
-rw-r--r-- | IkiWiki/Render.pm | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/IkiWiki/Render.pm b/IkiWiki/Render.pm index fc1bc0c92..ab3ccd7ae 100644 --- a/IkiWiki/Render.pm +++ b/IkiWiki/Render.pm @@ -245,11 +245,11 @@ sub prune ($) { #{{{ } #}}} sub refresh () { #{{{ - # security check, avoid following symlinks in the srcdir path + # security check, avoid following symlinks in the srcdir path by default my $test=$config{srcdir}; while (length $test) { - if (-l $test) { - error("symlink found in srcdir path ($test)"); + if (-l $test && ! $config{allow_symlinks_before_srcdir}) { + error("symlink found in srcdir path ($test) -- set allow_symlinks_before_srcdir to allow this"); } unless ($test=~s/\/+$//) { $test=dirname($test); |