diff options
author | Matthew Holt <mholt@users.noreply.github.com> | 2019-05-21 13:03:52 -0600 |
---|---|---|
committer | Matthew Holt <mholt@users.noreply.github.com> | 2019-05-21 13:03:52 -0600 |
commit | 9d54f655aa7698ce683786dfc31b6f11df3c89d2 (patch) | |
tree | 45622139ef12ba5ae52bc6a08692721b4edb6490 /modules/caddyhttp/fileserver/matcher.go | |
parent | 65195a726d9ceff4bbf870b7baa7eff20cf35381 (diff) |
Take care of remaining TODOs in the browse responder
Diffstat (limited to 'modules/caddyhttp/fileserver/matcher.go')
-rw-r--r-- | modules/caddyhttp/fileserver/matcher.go | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/modules/caddyhttp/fileserver/matcher.go b/modules/caddyhttp/fileserver/matcher.go index fd994d0..29805a2 100644 --- a/modules/caddyhttp/fileserver/matcher.go +++ b/modules/caddyhttp/fileserver/matcher.go @@ -3,7 +3,6 @@ package fileserver import ( "net/http" "os" - "path/filepath" "bitbucket.org/lightcodelabs/caddy2" "bitbucket.org/lightcodelabs/caddy2/modules/caddyhttp" @@ -33,8 +32,7 @@ type FileMatcher struct { // Match matches the request r against m. func (m FileMatcher) Match(r *http.Request) bool { - // TODO: sanitize path - fullPath := filepath.Join(m.Root, m.Path) + fullPath := sanitizedPathJoin(m.Root, m.Path) var match bool if len(m.Flags) > 0 { match = true |