CompTIA Security+ (SY0-501) — Question 248
An application was recently compromised after some malformed data came in via web form. Which of the following would MOST likely have prevented this?
Answer options
- A. Input validation
- B. Proxy server
- C. Stress testing
- D. Encoding
Correct answer: A
Explanation
Input validation is crucial for ensuring that only properly formatted data is accepted by the application, which would have prevented the compromise. The other options, while useful in different contexts, do not specifically address the issue of malformed data being submitted through a web form.