Beginner Cybersecurity & Cryptography
Q31 / 100

What is the purpose of input validation in web security?

Correct! Well done.

Incorrect.

The correct answer is B) Checking and sanitizing user input to prevent injection attacks, XSS, and other vulnerabilities caused by malicious data

B

Correct Answer

Checking and sanitizing user input to prevent injection attacks, XSS, and other vulnerabilities caused by malicious data

Explanation

Input validation: whitelist acceptable characters/formats, reject or sanitize others. Prevents SQL injection, XSS, command injection, and path traversal. Defense-in-depth: validate on both client and server.

Progress
31/100