NEWPractise supported commands in browser simulations, alongside the lesson.Try a browser practice exercise.Try a lab♥ Codelivly is 100% free, no paywall. If it helped you, chip in to keep it running.100% free. Help keep it so.Support us
Preview · 40 min
Test the server price, once per customer and once per line rules with a control for each, and read stored values instead of trusting accepted requests.
Marrow & Pine sells a TEST mug at 1200 pence and a TEST throw at 4500. Three of the shop rules protect that money. A client cannot name its own price, a discount code works once for each customer, and a line of an order can be returned once. On Tuesday afternoon, 2027-08-03, Kit sent an order with a unit price of 1 and the server answered 201.
On the same afternoon and on Wednesday morning, two requests that should have been refused answered with success. All three look alike in a proxy history: a POST by a customer with a 2xx status. Money rules are rarely settled by a single response. An accepted request may have been corrected on the way in, so each case needs the state before, one action that the rule forbids, and the state that resulted.
Create a free account to unlock the rest of this task, complete tasks, and earn Rep.
Sign in