runtime
462 / 500
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.

Functionfind_customer(conn, email)
Tablecustomers (customer_id, email, state)
Returnsthe customer_id of the customer with exactly that email, or None

Loading your progress…

Fix the customer lookup — Python practice · Runtime