fix: fix linter errors
This commit is contained in:
@@ -289,7 +289,8 @@ func SetFavicon(w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
|
||||
// Parse multipart form with 200KB max
|
||||
// Limit request body and parse multipart form with 200KB max
|
||||
r.Body = http.MaxBytesReader(w, r.Body, 200<<10)
|
||||
if err := r.ParseMultipartForm(200 << 10); err != nil {
|
||||
webutils.WriteSimpleResponse(w, false, "no file provided")
|
||||
return
|
||||
|
||||
@@ -59,6 +59,7 @@ func HandleAuthEndpointGet(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
|
||||
func HandleAuthEndpointPost(w http.ResponseWriter, r *http.Request) {
|
||||
r.Body = http.MaxBytesReader(w, r.Body, 1<<20)
|
||||
if err := r.ParseForm(); err != nil {
|
||||
webutils.WriteSimpleResponse(w, false, err.Error())
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user