jekyll/jekyll — pull request #2882 by parkr (2014-09-07 20:12:53+00:00)
Title: Centralize site path sanitation

This pull request introduces new standardized methods for accessing a directory from within the site's source or destination. The new methods introduced (and used heavily) are:

1. `Site#in_source_dir`
2. `Site#in_dest_dir`

These methods utilize `Jekyll.sanitized_path` to ensure the given path is, indeed, inside the source or destination directories to prevent filesystem traversal. A major exploit of hosted Jekyll systems is filesystem traversal, which makes the entire filesystem accessible to a malicious user (something we wish to avoid). This pull request should make the path sanitization a bit clearer to ease the review process for security teams.

:heart: :lock:

/cc @jekyll/security