Why is input validation important for web security?
- A.It reduces the size of web pages
- B.It speeds up database queries
- C.It makes web forms look more professional, because input validation belongs on the client side alone
- D.It prevents attackers from submitting malicious data that could exploit the application
Why D is correct
Input validation checks that user-supplied data meets expected formats and constraints before the application processes it. Without validation, attackers can submit malicious input (SQL commands, JavaScript code, unexpected characters) that exploits vulnerabilities. Both client-side and server-side validation are necessary for proper security.
Know someone studying for Security Fundamentals? Send them this one.