3
0

Add multopart form parsing to the auth route handlers

This commit is contained in:
Tomaž Jerman
2023-04-20 16:08:13 +02:00
parent b9f40c6009
commit 80596c970f

View File

@@ -202,6 +202,12 @@ func (h *AuthHandlers) handle(fn handlerFn) http.HandlerFunc {
return
}
// Caching 32MB to memory, the rest to disk
err = r.ParseMultipartForm(32 << 20)
if err != nil && err != http.ErrNotMultipart {
return
}
if !validFormPost(r) {
req.Status = http.StatusRequestEntityTooLarge
return