Multiple choice technology security

Once an input data validation flags an input as “invalid” what would be the most secure response ?

  1. Escape the invalid characters and continue processing the input data

  2. Accept the input data without modifying it and log the validation error

  3. Delete the invalid characters and continue processing the input data

  4. Reject the entire input data and send an error message back to the user

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

Rejecting the entire input is the most secure response because it prevents any potentially malicious data from being processed. Attempting to sanitize (escape or delete) invalid characters is risky, as new encoding techniques or attack vectors could bypass the filter. Complete rejection ensures the system remains in a secure state.