Software /
code /
prosody
Changeset
7229:dcc8ed11173c
mod_http_files: Don't prepend / to path twice, sanitize path does this already
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Thu, 03 Mar 2016 15:30:00 +0100 |
parents | 7228:b5b7ae2901e6 |
children | 7230:20246b139607 |
files | plugins/mod_http_files.lua |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/mod_http_files.lua Thu Mar 03 15:28:07 2016 +0100 +++ b/plugins/mod_http_files.lua Thu Mar 03 15:30:00 2016 +0100 @@ -95,7 +95,7 @@ end path = sanitized_path; local orig_path = sanitize_path(request.path); - local full_path = base_path .. (path and "/"..path or ""):gsub("/", path_sep); + local full_path = base_path .. (path or ""):gsub("/", path_sep); local attr = stat(full_path:match("^.*[^\\/]")); -- Strip trailing path separator because Windows if not attr then return 404;