summaryrefslogtreecommitdiffstats
path: root/api4/status.go
diff options
context:
space:
mode:
Diffstat (limited to 'api4/status.go')
-rw-r--r--api4/status.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/api4/status.go b/api4/status.go
index edba5460b..67b4d10bc 100644
--- a/api4/status.go
+++ b/api4/status.go
@@ -68,6 +68,12 @@ func updateUserStatus(c *Context, w http.ResponseWriter, r *http.Request) {
return
}
+ // The user being updated in the payload must be the same one as indicated in the URL.
+ if status.UserId != c.Params.UserId {
+ c.SetInvalidParam("user_id")
+ return
+ }
+
if !c.App.SessionHasPermissionToUser(c.Session, c.Params.UserId) {
c.SetPermissionError(model.PERMISSION_EDIT_OTHER_USERS)
return