fs: Clean paths before handling with FileServer

This commit is contained in:
Adnan Maolood 2021-02-17 00:57:44 -05:00
parent fa7ec1ac87
commit 73bf1a31b0

2
fs.go
View File

@ -32,7 +32,7 @@ type fileServer struct {
}
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