Fix path (#416)
* chan is leaked * Remove path.Clean Co-authored-by: Andrea Spacca <andrea.spacca@gmail.com>
This commit is contained in:
@ -37,7 +37,6 @@ import (
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
blackfriday "github.com/russross/blackfriday/v2"
|
||||
"html"
|
||||
html_template "html/template"
|
||||
"io"
|
||||
@ -54,9 +53,12 @@ import (
|
||||
text_template "text/template"
|
||||
"time"
|
||||
|
||||
blackfriday "github.com/russross/blackfriday/v2"
|
||||
|
||||
"net"
|
||||
|
||||
"encoding/base64"
|
||||
|
||||
web "github.com/dutchcoders/transfer.sh-web"
|
||||
"github.com/gorilla/mux"
|
||||
"github.com/microcosm-cc/bluemonday"
|
||||
@ -286,7 +288,7 @@ func (s *Server) notFoundHandler(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
|
||||
func sanitize(fileName string) string {
|
||||
return path.Clean(path.Base(fileName))
|
||||
return path.Base(fileName)
|
||||
}
|
||||
|
||||
func (s *Server) postHandler(w http.ResponseWriter, r *http.Request) {
|
||||
|
Reference in New Issue
Block a user