fs: Clean paths before handling with FileServer
This commit is contained in:
parent
fa7ec1ac87
commit
73bf1a31b0
2
fs.go
2
fs.go
@ -32,7 +32,7 @@ type fileServer struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (fs fileServer) ServeGemini(w ResponseWriter, r *Request) {
|
func (fs fileServer) ServeGemini(w ResponseWriter, r *Request) {
|
||||||
ServeFile(w, fs, r.URL.Path)
|
ServeFile(w, fs, path.Clean(r.URL.Path))
|
||||||
}
|
}
|
||||||
|
|
||||||
// ServeFile responds to the request with the contents of the named file
|
// ServeFile responds to the request with the contents of the named file
|
||||||
|
Loading…
Reference in New Issue
Block a user