mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-07 14:50:55 +03:00
WebClient: do not silently overwrite files/directories
Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
@@ -20,6 +20,7 @@ import (
|
||||
"net/http"
|
||||
"strings"
|
||||
|
||||
"github.com/go-chi/render"
|
||||
"github.com/unrolled/secure"
|
||||
|
||||
"github.com/drakkan/sftpgo/v2/internal/util"
|
||||
@@ -148,3 +149,8 @@ func getI18NErrorString(err error, fallback string) string {
|
||||
}
|
||||
return fallback
|
||||
}
|
||||
|
||||
func handlePingRequest(w http.ResponseWriter, r *http.Request) {
|
||||
r.Body = http.MaxBytesReader(w, r.Body, maxRequestSize)
|
||||
render.PlainText(w, r, "PONG")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user