Exercise 1: The Unchecked Order-Lookup Page — Possible Solution ==================================================================== THE EXPLOIT THIS LEAVES OPEN ------------------------------ Per this chapter, this is a broken access control vulnerability: any visitor - logged in or not, and regardless of whether they actually placed order N - can view order N's full details simply by changing the order_id value in the URL. An attacker can enumerate order IDs (482, 483, 484...) and read other customers' order details, including whatever PII the order contains (name, address, items purchased), with no authorization check stopping them. THE SPECIFIC FIX ------------------------------ Per this chapter, the order-fetching code itself must check ownership - comparing the order's own customer ID against the currently logged-in user's ID - before displaying anything, rather than relying on the URL simply not being linked to or guessed. CONNECTING TO WORDPRESS INTERMEDIATE/ADVANCED 8 ------------------------------ Per this chapter, this mirrors exactly the earlier warning about a hidden "Delete Post" button: "not linking directly to other customers' order IDs doesn't stop someone from simply guessing or incrementing the number in the URL." In both cases, the real fix is an explicit check inside the code that performs the privileged action (viewing someone else's order, or deleting a post) - never relying on the interface simply not exposing a link to it. WHY THIS WORKS AS AN ANSWER ------------------------------ It correctly names the vulnerability as broken access control, correctly specifies the ownership-check fix, and correctly ties the underlying principle back to the exact WordPress Intermediate/ Advanced 8 example this chapter itself draws the parallel to.