diff options
Diffstat (limited to 'api4/user.go')
-rw-r--r-- | api4/user.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/api4/user.go b/api4/user.go index ac702644d..b73354cfd 100644 --- a/api4/user.go +++ b/api4/user.go @@ -5,6 +5,8 @@ package api4 import ( "fmt" + "io" + "io/ioutil" "net/http" "strconv" "time" @@ -234,6 +236,8 @@ func getProfileImage(c *Context, w http.ResponseWriter, r *http.Request) { } func setProfileImage(c *Context, w http.ResponseWriter, r *http.Request) { + defer io.Copy(ioutil.Discard, r.Body) + c.RequireUserId() if c.Err != nil { return |