From f2abb9d8eb4b35369d286749ede37916a8979e07 Mon Sep 17 00:00:00 2001 From: Saturnino Abril Date: Tue, 27 Jun 2017 04:05:50 +0800 Subject: fix permission app error with updatePost (#6749) --- api4/post.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'api4/post.go') diff --git a/api4/post.go b/api4/post.go index 7bfe5ad64..65a508df7 100644 --- a/api4/post.go +++ b/api4/post.go @@ -302,6 +302,10 @@ func searchPosts(c *Context, w http.ResponseWriter, r *http.Request) { func updatePost(c *Context, w http.ResponseWriter, r *http.Request) { c.RequirePostId() + if c.Err != nil { + return + } + post := model.PostFromJson(r.Body) if post == nil { -- cgit v1.2.3-1-g7c22