From a885253d128683e6bbe654a301af00df96bde45d Mon Sep 17 00:00:00 2001 From: bouncepaw Date: Tue, 1 Dec 2020 01:33:15 +0500 Subject: [PATCH] Fix uploading attachments on wikis with no auth --- http_mutators.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/http_mutators.go b/http_mutators.go index 232fed3..1283f59 100644 --- a/http_mutators.go +++ b/http_mutators.go @@ -174,7 +174,7 @@ func handlerUploadBinary(w http.ResponseWriter, rq *http.Request) { log.Println(rq.URL) var ( hyphaName = HyphaNameFromRq(rq, "upload-binary") - u = user.FromRequest(rq) + u = user.FromRequest(rq).OrAnon() ) if !u.CanProceed("upload-binary") { HttpErr(w, http.StatusForbidden, hyphaName, "Not enough rights", "You must be an editor to upload attachments.")