question 462 Secure Python · easy
Fix the customer lookup
Support reports two problems with the "find customer by email" tool: it crashes for Liam O'Brien, and a tester typing x' OR '1'='1 into the box was shown every customer. Fix find_customer so both stop happening and normal lookups still work.
Function
find_customer(conn, email)Table
customers (customer_id, email, state)Returnsthe
customer_id of the customer with exactly that email, or None