Why is input validation important for web security?
- A.It makes web forms look more professional
- B.It prevents attackers from submitting malicious data that could exploit the application
- C.It speeds up database queries
- D.It reduces the size of web pages
Why B 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.