- Home
- All questions
- Question 146
CompTIA Security+ study material · question 146 of 611
Why should input be canonicalised before it is validated?
Show the answer
Answer: C. So that two encodings of the same string are not treated differently
Without canonicalisation an attacker can encode a forbidden value so the check passes but the consumer decodes it back.
Source: OWASP Input Validation Cheat Sheet (OWASP) — OWASP Input Validation Cheat Sheet › Validation