diff options
author | Kim Alvefur <zash@zash.se> | 2016-03-03 15:30:00 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2016-03-03 15:30:00 +0100 |
commit | 6ee217ad112f35b5f2f72a49965ea81bd5a8008b (patch) | |
tree | ad44392c6312ae478a4815f44abb0828a7680c8b /plugins/mod_http_files.lua | |
parent | d4ec0ae3cde1dc5dba5a935e8c9926d63fb5a05a (diff) | |
download | prosody-6ee217ad112f35b5f2f72a49965ea81bd5a8008b.tar.gz prosody-6ee217ad112f35b5f2f72a49965ea81bd5a8008b.zip |
mod_http_files: Don't prepend / to path twice, sanitize path does this already
Diffstat (limited to 'plugins/mod_http_files.lua')
-rw-r--r-- | plugins/mod_http_files.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/mod_http_files.lua b/plugins/mod_http_files.lua index 097f8346..fc39628c 100644 --- a/plugins/mod_http_files.lua +++ b/plugins/mod_http_files.lua @@ -95,7 +95,7 @@ function serve(opts) 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; |