hugo/hugolib
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
..
author.go
benchmark_test.go
datafiles_test.go
handler_base.go
handler_file.go
handler_meta.go
handler_page.go
handler_test.go
hugo.go
media.go
menu.go Remove deprecated fields and methods for v0.15 2015-07-30 13:33:38 +02:00
menu_test.go fix TestHomeNodeMenu test 2015-07-14 21:31:47 +02:00
node.go Remove deprecated fields and methods for v0.15 2015-07-30 13:33:38 +02:00
page.go WordCount Summary support UTF-8 string 2015-09-12 15:41:17 +02:00
page_permalink_test.go
page_taxonomy_test.go
page_test.go Correct check of published boolean 2015-08-31 05:26:46 +02:00
page_time_integration_test.go
pageCache.go Move apply before cache put 2015-07-24 00:28:21 +02:00
pageCache_test.go Fix data races in sorting and Reverse 2015-07-23 12:43:57 +02:00
pageGroup.go
pageGroup_test.go
pageSort.go Replace strings.Compare 2015-07-25 17:38:13 +02:00
pageSort_test.go Fix sort test and title sort 2015-07-25 17:22:46 +02:00
pagesPrevNext.go
pagesPrevNext_test.go
pagination.go Remove deprecated fields and methods for v0.15 2015-07-30 13:33:38 +02:00
pagination_test.go Remove deprecated fields and methods for v0.15 2015-07-30 13:33:38 +02:00
path_separators_test.go
path_separators_windows_test.go
permalinks.go
permalinks_test.go
planner.go
redis.cn.md
rss_test.go
scratch.go Add map support to scratch 2015-08-02 17:23:36 +02:00
scratch_test.go Add map support to scratch 2015-08-02 17:23:36 +02:00
shortcode.go Avoid panic in shortcode param handling 2015-08-07 20:08:23 +02:00
shortcode_test.go Avoid panic in shortcode param handling 2015-08-07 20:08:23 +02:00
shortcodeparser.go
shortcodeparser_test.go
site.go Validate aliases to prevent directory traversal etc. 2015-09-13 18:08:42 +02:00
site_show_plan_test.go
site_test.go Complete the Url-to-URL transition in tests 2015-09-13 05:21:24 -06:00
site_url_test.go
siteinfo_test.go
siteJSONEncode_test.go
sitemap.go
sitemap_test.go
summary.go
taxonomy.go Add config option "disablePathToLower" 2015-09-01 15:26:02 +02:00
taxonomy_test.go