From 891ea8f604d6fb17d8d9b61a7ae524965ee7469e Mon Sep 17 00:00:00 2001 From: Anatol Broder Date: Mon, 16 Sep 2013 08:37:07 +0200 Subject: [PATCH] People can symlink it if they want in unsafe mode --- lib/jekyll/tags/include.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/jekyll/tags/include.rb b/lib/jekyll/tags/include.rb index 3cb8820b..4bae7db1 100644 --- a/lib/jekyll/tags/include.rb +++ b/lib/jekyll/tags/include.rb @@ -66,7 +66,7 @@ eos end def validate_file(dir) - if File.symlink?(dir) + if File.symlink?(dir) && context.registers[:site].safe? return "Includes directory '#{dir}' cannot be a symlink" end @@ -77,7 +77,7 @@ eos file = File.join(dir, @file) if !File.exists?(file) return "Included file #{@file} not found in #{INCLUDES_DIR} directory" - elsif File.symlink?(file) + elsif File.symlink?(file) && context.registers[:site].safe? return "The included file '#{INCLUDES_DIR}/#{@file}' should not be a symlink" end end