Allow uppercasing and less rigide sanitizing of filenames, fixes #10

This commit is contained in:
Remco
2017-03-23 11:46:59 +01:00
parent 964e8c92d7
commit 45bafbe48f
3 changed files with 12 additions and 12 deletions

View File

@ -32,19 +32,17 @@ import (
"io"
"log"
"net/http"
"path/filepath"
"time"
clamd "github.com/dutchcoders/go-clamd"
"github.com/gorilla/mux"
"github.com/kennygrant/sanitize"
)
func (s *Server) scanHandler(w http.ResponseWriter, r *http.Request) {
vars := mux.Vars(r)
filename := sanitize.Path(filepath.Base(vars["filename"]))
filename := sanitize(vars["filename"])
contentLength := r.ContentLength
contentType := r.Header.Get("Content-Type")