CompTIA Security+ (SY0-501) — Question 334
Which of the following best describes routine in which semicolons, dashes, quotes, and commas are removed from a string?
Answer options
- A. Error handling to protect against program exploitation
- B. Exception handling to protect against XSRF attacks.
- C. Input validation to protect against SQL injection.
- D. Padding to protect against string buffer overflows.
Correct answer: C
Explanation
The correct answer is C, as input validation is essential for sanitizing user input to prevent SQL injection attacks. Options A, B, and D pertain to different security measures that do not specifically address the removal of characters from strings for the purpose of input validation.