Don't read symlinks in site.include in safe mode (#7711)
Merge pull request 7711
This commit is contained in:
parent
9ccdae161b
commit
68a31c8eb2
|
@ -161,11 +161,14 @@ module Jekyll
|
||||||
end
|
end
|
||||||
|
|
||||||
def read_included_excludes
|
def read_included_excludes
|
||||||
|
entry_filter = EntryFilter.new(site)
|
||||||
|
|
||||||
site.include.each do |entry|
|
site.include.each do |entry|
|
||||||
next if entry == ".htaccess"
|
next if entry == ".htaccess"
|
||||||
|
|
||||||
entry_path = site.in_source_dir(entry)
|
entry_path = site.in_source_dir(entry)
|
||||||
next if File.directory?(entry_path)
|
next if File.directory?(entry_path)
|
||||||
|
next if entry_filter.symlink?(entry_path)
|
||||||
|
|
||||||
read_included_file(entry_path) if File.file?(entry_path)
|
read_included_file(entry_path) if File.file?(entry_path)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue