Essay 4 · Practice

Essay 4 — review after attempting the lab

An initial reference solution was built and run while writing this essay: its recorded run passed sixteen tests, the twelve original tests plus four new ones. That historical run does not substitute for executing your revised implementation. It is deliberately not published. What follows is the behaviour a sound solution shows and the decisions it has to make, so you can check your own work without copying code.

Behaviour a sound solution shows

Case Result in the reference solution
Carol reads C-1001 200: membership still allows reading
Carol requests export of C-1001 403: refused, no job row created
Alice's valid export Job DONE, download 200
Alice revoked before the worker runs Job DENIED, no content written
Alice revoked after DONE, before download Download 404
ScopedRepairTest All six still pass

Decisions that can differ and still be right

Where the checks belong

Incomplete answers to look for

Academy labs

For the GUID lab, the unpredictable identifier is found elsewhere in the application; the missing check is that the account page loads the requested user's data without comparing it with the signed-in user. For the IDOR lab, stored chat logs are served from static URLs with no check that the requester owns the file. In both, the repair belongs where the object is loaded for the current user, which is the same place as in the invoice lab. If you used the published solution or hints, record the lab as assisted.

This review describes behaviour, not proof that your implementation is complete. Keep a note of any path your change does not cover.

Return to essay 4Back to worksheet