Multiple choice general knowledge science & technology

Out of the Following, which is one of the Injection Prevention Mechanisms ?

  1. Avoid Escape Special Characters

  2. Use of non Parameterized API

  3. Input Validation against Whitelist

  4. Avoid sending the wrong data at first place as request parameter.

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

Input validation against a whitelist is a correct injection prevention mechanism. A whitelist defines exactly what inputs are allowed, rejecting anything that doesn't match. This prevents injection attacks by ensuring only valid, expected data enters the system. Avoid escaping special characters would make you vulnerable, non-parameterized APIs are vulnerable, and while avoiding wrong data helps, validation against whitelist is the technical prevention mechanism.