MM-11520: Make entity ID checks consistent across api4. (#9395)

* MM-11520: Make entity ID checks consistent across api4.

* Update tests.
Этот коммит содержится в:
George Goldberg
2018-09-14 16:21:05 +01:00
коммит произвёл Christopher Speller
родитель 83a00ae925
Коммит fdbb6de3d5
8 изменённых файлов: 70 добавлений и 22 удалений

Просмотреть файл

@@ -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)