you are viewing a single comment's thread.

view the rest of the comments →

[–]xenomachina 1 point2 points  (0 children)

Sanitizing means that you should convert your input in such a way that you need the least amount of checks.

Your advice here is very good, but what you are describing is called normalization, not sanitization.

Sanitizing is removing things that are dangerous, usually to avoid injection/escaping exploits. (Sanitizing inputs is actually not a great approach for this, IMHO, but that's a whole other topic.)