projects
/
prosody.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a3c1a4a
)
mod_http_files: Don't prepend / to path twice, sanitize path does this already
author
Kim Alvefur
<zash@zash.se>
Thu, 3 Mar 2016 14:30:00 +0000
(15:30 +0100)
committer
Kim Alvefur
<zash@zash.se>
Thu, 3 Mar 2016 14:30:00 +0000
(15:30 +0100)
plugins/mod_http_files.lua
patch
|
blob
|
history
diff --git
a/plugins/mod_http_files.lua
b/plugins/mod_http_files.lua
index 097f83468b41725e218794664d27970d2919cb7d..fc39628ccba073f97ff6ea615811609708c6e980 100644
(file)
--- 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;