hugo/target
Anthony Fok e71bef79e5 Validate aliases to prevent directory traversal etc.
Add validation before creating aliases:

 * Prevent creating aliases outside webroot (public/ dir)
 * Skip empty "" alias
 * Skip "/" → "/index.html", which gets overwritten anyway
 * Refuse to create Windows-invalid filenames on Windows;
   warn on other platforms
 * In case of invalid aliases, after skipping them,
   return `err = nil` to prevent the error passing up
   all the way to `hugolib.Render()` and causing Hugo to abort.
 * Update alias tests.

Fixes #701: Add support for alias with whitespace
Fixes #1418: Add validation for alias
2015-09-13 18:08:42 +02:00
..
alias_test.go Validate aliases to prevent directory traversal etc. 2015-09-13 18:08:42 +02:00
file.go Make sure target destination has the right path separator. 2015-06-11 21:16:51 +02:00
htmlredirect.go Validate aliases to prevent directory traversal etc. 2015-09-13 18:08:42 +02:00
memory.go Code cleanup 2013-10-08 18:40:41 +02:00
page.go Add support for URLs relative to context root 2015-05-16 00:11:44 +02:00
page_test.go More initialism corrections (golint) 2015-03-18 11:30:37 +01:00