From c5eff11c39d0a07f5cb7401835d04ba4df9edcbf Mon Sep 17 00:00:00 2001 From: FChannel <> Date: Thu, 22 Jul 2021 20:15:31 -0700 Subject: null reference --- Server | Bin 11195223 -> 0 bytes outboxPost.go | 4 ++-- 2 files changed, 2 insertions(+), 2 deletions(-) delete mode 100755 Server diff --git a/Server b/Server deleted file mode 100755 index 4977d41..0000000 Binary files a/Server and /dev/null differ diff --git a/outboxPost.go b/outboxPost.go index a827e21..b3a8baf 100644 --- a/outboxPost.go +++ b/outboxPost.go @@ -25,9 +25,9 @@ func ParseOutboxRequest(w http.ResponseWriter, r *http.Request, db *sql.DB) { r.ParseMultipartForm(5 << 20) if(BoardHasAuthType(db, actor.Name, "captcha") && CheckCaptcha(db, r.FormValue("captcha"))) { f, header, _ := r.FormFile("file") - defer f.Close() - + if(header != nil) { + defer f.Close() if(header.Size > (7 << 20)){ w.WriteHeader(http.StatusRequestEntityTooLarge) w.Write([]byte("7MB max file size")) -- cgit v1.2.3