summaryrefslogtreecommitdiffstats
path: root/api4/oauth.go
diff options
context:
space:
mode:
Diffstat (limited to 'api4/oauth.go')
-rw-r--r--api4/oauth.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/api4/oauth.go b/api4/oauth.go
index 990f292e9..2ed6641ee 100644
--- a/api4/oauth.go
+++ b/api4/oauth.go
@@ -91,6 +91,12 @@ func updateOAuthApp(c *Context, w http.ResponseWriter, r *http.Request) {
return
}
+ // The app being updated in the payload must be the same one as indicated in the URL.
+ if oauthApp.Id != c.Params.AppId {
+ c.SetInvalidParam("app_id")
+ return
+ }
+
c.LogAudit("attempt")
oldOauthApp, err := c.App.GetOAuthApp(c.Params.AppId)