Quiz: Object & Function Level¶
Review first: Object & Function Level
Question 1
GET /api/invoices/{id} verifies the JWT signature, expiry, and that the token has the invoices:read scope, then returns the invoice by ID. A pentester reports a critical finding. What's most likely?
Question 2
PATCH /users/me binds the JSON body directly onto the user entity and saves it. Which request demonstrates the vulnerability?
Question 3
The admin UI only shows the "Delete user" button to admins. A regular user reads the JavaScript bundle, finds DELETE /api/users/{id}, and calls it successfully. Which vulnerability is this?
Question 4
GET /projects/{pid}/tasks/{tid} checks that the caller is a member of project pid, then loads task tid by its ID. What's the gap?
Question 5
A GET /users/{id} handler returns the ORM entity directly. The frontend only displays name and avatar, but the JSON also contains password_hash, email, and internal_risk_score. How should this be fixed?
Question 6
Your REST GET /orders/{id} correctly checks ownership. Which other paths commonly skip the same check? Select ALL that apply: