Security Operations
A web form accepts a username field. Which control best prevents attackers from submitting SQL commands through it?
Show the answer
Correct answerD. Input validation
AWhy not this: They protect session cookies in transit and from scripts; they do not filter submitted form data.
BWhy not this: It reviews source code without running it; it does not block data submitted at runtime.
CWhy not this: It proves who published code and that it is unaltered; it does not filter form input.
DWhy this is right: It rejects or sanitizes unexpected data at the point of entry, stopping injected commands from being processed.
Input validation checks that submitted data matches expected type, length and format before the application processes it, which blocks injected SQL. Static code analysis can find missing validation in source but does not filter data at runtime.