A web application stores user cart data in a cookie to support users who are not logged in. The cookie value is '{"items":["SKU-001"],"price":29.99}'. Why must the server recalculate the price at checkout?
- A.Cookie data is stored unencrypted on disk (in the profile folder), letting any local user read the cart contents; the server must never trust the stored price, recalculating from the catalog table for each SKU in the order at the moment the payment is authorized
- B.The price field in a cookie is signed by the browser (with a hash of the SKU), a check that only protects against accidental corruption; the server recalculates every price at checkout, never reading the cookie value for any line item in the order
- C.Cookies are limited to 4KB (a hard size cap), forcing the server to rebuild the cart from the SKU list; all prices must be reloaded from the database at checkout to stay under that limit
- D.Cookie data is fully user-controlled; an attacker can modify the price field to any value (e.g., 0.01) before submitting checkout. The server must always recalculate prices from authoritative database records, not from client-supplied data