mirror of
https://github.com/jekyll/jekyll.git
synced 2026-01-29 16:58:01 -05:00
Properly strip drive name from clean path when sanitizing path.
This commit is contained in:
committed by
Parker Moore
parent
37c2da5062
commit
19dc855551
@@ -111,7 +111,7 @@ module Jekyll
|
||||
|
||||
def self.sanitized_path(base_directory, questionable_path)
|
||||
clean_path = File.expand_path(questionable_path, fs_root)
|
||||
clean_path.gsub!(/\/\w\:\//, '/')
|
||||
clean_path.gsub!(/\w\:\//, '/')
|
||||
unless clean_path.start_with?(base_directory)
|
||||
File.join(base_directory, clean_path)
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user