Verify project id presence in API requests
What does this MR do and why?
- Contributes to #351520 (closed)
- Sentry error: https://sentry.gitlab.net/gitlab/gitlabcom/issues/3184048
Problem
It is possible to skip Grape id validation for http OPTIONS method.
Solution
Verify that id is present
How to set up and validate locally
Following request should not return a 500 error
curl -XOPTIONS "http://127.0.0.1:3000/api/v4/projects/{id}/repository/commits"
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.