A web form passes a customer's phone number into a database query. Which actions apply input validation to this field? (Choose two.)
Choose 2 answers
Show the answer
Correct answersC. Validate each value on the server, even if the browser already checked itD. Accept only values matching the expected type, length and format
AWhy not this: Client-side checks are easily bypassed with a proxy or direct request, so they cannot be the only control.
BWhy not this: Code signing proves who published code and that it is unaltered; it does not inspect submitted form data.
CWhy this is right: Server-side checks cannot be skipped by an attacker who bypasses the browser or sends requests directly.
DWhy this is right: Allowing only the expected type, length and format rejects injection payloads before they reach the query.
Input validation checks data against what is expected, and it must run on the server because an attacker can bypass browser code. Browser-only checks fail for that reason, and code signing proves script origin but does nothing to inspect submitted data.