fix: fix linter errors

This commit is contained in:
Gabe Kangas
2026-03-24 11:12:53 -07:00
parent caff76ec08
commit 73206ddf27
8 changed files with 29 additions and 87 deletions
+2 -1
View File
@@ -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